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 | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
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 | |
$query_args = array( | |
'foo' => 'bar', | |
'apple' => 'orange', | |
'posts_per_page' => 50, | |
'offset' => 0, | |
); |
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: WordPress.com Watermark Image Uploads | |
* Author: Alex Mills | |
* Author URI: http://automattic.com/ | |
*/ | |
class WPcom_Watermark_Uploads { | |
public $watermark; |
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: Generate Thumbnails On The Fly | |
Description: When a thumbnail image is requested of a specific width/height (rather than by name), generate it if it doesn't exist. | |
Version: 1.0.0 | |
Author: Alex Mills (Viper007Bond) | |
Author URI: http://www.viper007bond.com/ |
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: Custom Post Password Cookie Expiry Time | |
Description: WordPress doesn't allow you to customize how long a post password cookie lasts. This plugin allows you to customize that value; | |
Version: 1.0.0 | |
Author: Alex Mills (Viper007Bond) | |
Author URI: http://www.viper007bond.com/ |
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 | |
/** | |
* Fetching all posts from the database would suck up a lot of memory. | |
* So instead this code processes 25 posts at a time. | |
*/ | |
$posts_at_a_time = 25; | |
$query_args = array( |
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: 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 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 | |
/** | |
* Google Contacts Syncer | |
* by Alex Mills (http://www.viper007bond.com/) | |
* | |
* This script copies all contacts from Google account A to | |
* Google account B, wiping out all existing contacts in | |
* account B's account in the process. | |
* |
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 | |
/** | |
* This is a version of | |
* http://www.viper007bond.com/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/ | |
* that supports multiple placeholders. In this case, the placeholder fetches | |
* the latest post from a particular category. | |
*/ | |
// Front end only, don't hack on the settings page |
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 | |
/** | |
* All of this code is in a big class that implements things like meta boxes and | |
* tons of other stuff but for now here's the relevant functions. | |
* | |
* Note the custom post types and custom taxonomies are just in placeholder form. | |
* I haven't gone through and properly set the labels, etc. for them like I will | |
* when I release the plugin. | |
*/ |
NewerOlder