This file contains hidden or 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: Sticky Custom Post Types | |
| Plugin URI: http://superann.com/sticky-custom-post-types/ | |
| Description: Enables support for sticky custom post types. Set options in Settings → Reading. | |
| Version: 1.2.2 | |
| Author: Ann Oyama | |
| Author URI: http://superann.com | |
| License: GPL2 |
This file contains hidden or 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 | |
| require_once( 'wp-load.php' ); | |
| $data = array( | |
| 'posts' => wp_count_posts( 'post' )->publish, | |
| 'pages' => wp_count_posts( 'page' )->publish, | |
| 'categories' => wp_count_terms( 'category' ), | |
| 'tags' => wp_count_terms( 'post_tag' ), | |
| 'comments' => wp_count_comments()->approved, |
This file contains hidden or 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 | |
| class Tests_WP_Query_Date_Base extends WP_UnitTestCase { | |
| public $q; | |
| public function setUp() { | |
| parent::setUp(); | |
| // Be careful modifying this. Tests are coded to expect this exact sample data. |
This file contains hidden or 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: WordPress.com Watermark Image Uploads | |
| * Description: Applies a watermark image of your choosing to all uploaded images. | |
| * Author: Alex Mills | |
| * Author URI: http://automattic.com/ | |
| */ | |
| class WPcom_Watermark_Uploads { |
This file contains hidden or 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 | |
| $items = implode( | |
| ', ', | |
| array_merge( | |
| wp_list_pluck( (array) get_the_tags(), 'name' ), | |
| wp_list_pluck( (array) get_the_category(), 'slug' ) | |
| ) | |
| ); | |
| if ( $items ) { |
This file contains hidden or 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 | |
| wp_oembed_add_provider( 'http://instagram.com/p/*', 'http://api.instagram.com/oembed' ); | |
| add_shortcode( 'instagram', 'shortcode_instagram' ); | |
| function shortcode_instagram( $atts ) { | |
| global $wp_embed; | |
| return $wp_embed->shortcode( $atts, $atts['url'] ); |
This file contains hidden or 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 | |
| add_filter( 'embed_oembed_html', 'blogsuccessjrnl_youtube_autoplay', 10, 4 ); | |
| function blogsuccessjrnl_youtube_autoplay( $html, $url, $attr, $post_ID ) { | |
| // Abort if not in a single-post view. You don't want these auto-playing on you homepage. | |
| if ( ! is_singular() ) | |
| return $html; |
This file contains hidden or 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 | |
| $current_category = get_queried_object(); | |
| if ( $current_category->category_parent ) { | |
| $parent_category = get_category( $current_category->category_parent ); | |
| $parent = $parent_category->name; | |
| } |
This file contains hidden or 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 | |
| class WP_Widget_Text_HTML_In_Title extends WP_Widget { | |
| function __construct() { | |
| $widget_ops = array( 'classname' => 'widget_text_html_in_title', 'description' => 'Arbitrary text or HTML. Allows HTML in title field.' ); | |
| $control_ops = array( 'width' => 400, 'height' => 350 ); | |
| parent::__construct( 'text-html-in-title', 'Text (Allows HTML In Title)', $widget_ops, $control_ops ); | |
| } |
This file contains hidden or 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 | |
| add_action( 'plugins_loaded', 'tomnelseon_remove_birchschedule_hook' ); | |
| function tomnelseon_remove_birchschedule_hook() { | |
| global $birchschedule; | |
| remove_action( 'wp_ajax_birs_get_avaliable_time', array( $birchschedule->shortcode, 'ajax_get_avaliable_time' ) ); | |
| } |