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('sharepress_supported_post_types', '__my_sharepress_supported_post_types'); | |
| function __my_sharepress_supported_post_types($types) { | |
| $types[] = 'bgmp'; | |
| return $types; | |
| } | |
| add_filter('filter_sharepress_meta', '__my_filter_sharepress_meta', 10, 3); | |
| function __my_filter_sharepress_meta($meta, $post) { | |
| if ($post->post_type == 'bgmp') { |
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 | |
| // Based on: http://wordpress.org/extend/plugins/wp-missed-schedule/ | |
| @define('MISSED_SCHEDULE_DELAY', 5); | |
| @define('MISSED_SCHEDULE_OPTION', 'wp_missed_schedule'); | |
| function fix_missed_schedule() { | |
| global $wpdb; | |
| // check to see if the publishing window is up again... |
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 | |
| /** | |
| * Youtube Shortcode Solution | |
| * | |
| * Set your desired width for all the videos on your site (below) | |
| * Paste any Youtube video link in the shortcode, using this format, i.e.: | |
| * [youtube value="http://www.youtube.com/watch?feature=player_embedded&v=GGT8ZCTBoBA"] | |
| * This code will automatically resize your video to the appropriate size and aspect ratio. | |
| * Modify the width value (set to 590 here), and the iframe code below to your desired settings. | |
| * This requires coreylib (coreylib.com) |
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
| tail -f file | perl -pe 's/(ERROR|WARN)/\e[1;31;43m$&\e[0m/g' |
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('sharepress_supported_post_types', '__my_sharepress_supported_post_types'); | |
| function __my_sharepress_supported_post_types($types) { | |
| // Want to add SharePres support to a Page? Uncomment this line: | |
| //$types[] = 'page'; | |
| // Want to add SharePress support to custom post types? List them thusly: | |
| $types[] = 'my_custom_type_1'; | |
| $types[] = 'my_custom_type_2'; |
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('sharepress_ok_page_names', '__my_sharepress_ok_page_names'); | |
| function __my_sharepress_ok_page_names($pages) { | |
| $current_site = get_current_site(); | |
| if ($current_site->blog_id == 1) { | |
| return array('OK Page Title for Blog #1'); | |
| } else if ($current_site->blog_id == 2) { | |
| return array('OK Page Title for Blog #2'); | |
| } else { | |
| return $pages; // your default might be none, by way of array() |
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 | |
| // usage: Dashboard_MobileDetect::is(); // == true when mobile, otherwise false | |
| # | |
| # Mobile Detect | |
| # @see http://code.google.com/p/php-mobile-detect/ | |
| # @license http://www.opensource.org/licenses/mit-license.php The MIT License | |
| ## | |
| class Dashboard_MobileDetect { |
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('wordpress-oauth-support.php'); | |
| class YourPluginNamespace extends YourPluginNamespace_WordPressOAuthSupport { | |
| function __construct() { | |
| add_action('init', array($this, 'init')); | |
| } | |
| function init() { |