This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: AK.org Hide Post Format Tabs | |
Plugin URI: https://gist.github.com/alexkingorg/5557869 | |
Description: Reduce the footprint of the post format tabs in the WordPress admin UI. | |
Version: 1.0 | |
Author: Alex King | |
Author URI: http://alexking.org | |
License: GPL2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: AK.org Minimalist Post Format Tabs | |
Plugin URI: https://gist.github.com/alexkingorg/5557869 | |
Description: Reduce the footprint of the post format tabs in the WordPress admin UI. | |
Version: 1.0 | |
Author: Alex King | |
Author URI: http://alexking.org | |
License: GPL2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// enqueue the script, | |
// this fails gracefully if no 'heartbeat' script is registered | |
wp_enqueue_script('heartbeat'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Slightly smaller titles for link posts */ | |
article.format-link .entry-header { | |
min-height: 20px; | |
} | |
article.format-link .entry-header .entry-title { | |
font-size: 20px; | |
line-height: 20px; | |
} | |
article.format-link .entry-header .entry-date { | |
line-height: 16px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: AK.org Strict Open Graph Tags | |
* Description: Add Open Graph tags so that Facebook (and any other service that supports them) can crawl the site better and we provide a better sharing experience | |
* Author: Automattic and Alex King | |
* License: GPLv2, baby! | |
* | |
* @link http://ogp.me/ | |
* @link http://developers.facebook.com/docs/opengraph/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aktt_test_skip_blog_post($bool, $data, $tweet) { | |
// make decisions here | |
return false; // no post will be created | |
} | |
add_filter('aktt_tweet_create_blog_post', 'aktt_test_skip_blog_post', 10, 3); | |
function aktt_test_skip_status($format, $data, $tweet) { | |
// return 'aside'; // string will be used as format | |
return false; // no format will be set | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$thumbnails = get_theme_support('post-thumbnails'); | |
if (is_array($thumbnails)) { | |
add_theme_support('post-thumbnails', array_merge($thumbnails[0], array(self::$post_type))); | |
} | |
else if (!$thumbnails) { | |
add_theme_support('post-thumbnails', array(self::$post_type)); | |
} | |
// else already enabled for all post types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @group comment | |
* @group slashes | |
*/ | |
class Tests_Comment_Slashes extends WP_UnitTestCase { | |
function setUp() { | |
parent::setUp(); | |
// we need an admin user to bypass comment flood protection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @group meta | |
* @group slashes | |
* @ticket 21767 | |
*/ | |
class Tests_Meta_Slashes extends WP_UnitTestCase { | |
function setUp() { | |
parent::setUp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @group post | |
* @group slashes | |
*/ | |
class Tests_Post_Slashes extends WP_UnitTestCase { | |
function setUp() { | |
parent::setUp(); | |
$this->author_id = $this->factory->user->create( array( 'role' => 'editor' ) ); |