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 | |
/** | |
* Used where you might want to use an activation function but where it's not convenient or possible (like in a theme.) | |
* Accepts __FILE__ for the a unique key to identify the file. | |
* | |
* @param string $file | |
* @return bool | |
* | |
* Author: Mike Schinkel | |
* Author URI: http://about.me/mikeschinkel/ |
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 | |
/** | |
* Simplifies addition of WordPress hooks to a class. | |
* | |
* Simplifies addition of WordPress hooks to a class by adding any method and using WordPress-specific PHPDoc tags | |
* including @wp-autohook, @wp-nohook, @wp-action, @wp-filter and @wp-priority. | |
* | |
* Props Ryan McCue (https://gist.github.com/rmccue) for suggestion to use $method->getDocComment() instead of | |
* passing in method properties via array arguments. |
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 | |
/** | |
* Example for use of proposed add_autohook_support() for WordPress. | |
* | |
* @see: https://gist.github.com/1630212 | |
* | |
* @author Mike Schinkel - http://about.me/mikeschinkel/ | |
* | |
* @wp-autohook implicit | |
* |
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 | |
/* | |
* Code Examples for Master WordPress Custom Post Types - WordCamp Atlanta 2012 | |
* | |
* Author: Mike Schinkel | |
* Author URI: http://about.me/mikeschinkel | |
* | |
*/ | |
add_action( 'init', 'mikes_theme_init' ); | |
function mikes_theme_init() { |
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: Sync Plugin Info | |
Plugin URI: http://mikeschinkel.com/wordpress-plugins/sync-plugin-info | |
Description: Synchronizes Plugin Info from <a href="http://api.wordpress.org" target="_blank">api.wordpress.org</a> to tables in the local MySQL database | |
Version: 0.1 | |
Author: Mike Schinkel | |
Author URI: http://mikeschinkel.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
Here's a list of Mac OS X Apps I've found indispensable coming from Windows. | |
It's not the complete list of apps I used or cannot live without as it doesn't | |
include ones Windows users would already know about. | |
-Mike Schinkel | |
http://about.me/mikeschinkel | |
Last Updated: Feb 21, 2012 | |
Must Have |
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: Root-based Taxonomy URLs for WordPress | |
* Description: Enables root-based Taxonomy URLs, i.e. Makes /taxonomy/my-taxonomy/ URLs route as /my-taxonomy/ | |
* Author: Mike Schinkel | |
* Author URI: http://about.me/mikeschinkel | |
* Plugin URI: https://gist.github.com/1421235 | |
* Version: 0.1 | |
* License: GPL 2+ | |
* Notes: Must use register_root_based_taxonomy_url( $taxonomy[, $priority] ) in an 'init' hook to specify root_based taxonomy. |
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 | |
/** | |
* Written to help @Frump with https://github.com/Frumph/comic-easel/issues/2 | |
*/ | |
class Comics_URL_Class { | |
static function on_load() { | |
add_filter( 'init', array( __CLASS__, 'init' ) ); | |
add_filter( 'request', array( __CLASS__, 'request' ) ); | |
add_filter( 'feed_link', array( __CLASS__, 'feed_link' ) ); |
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
/comic/{$chapter_slug}/{$post_slug}/ -> display a post whose parent is a chapter | |
/feed/ -> displays 'post' and 'comic' | |
/comic/feed/ -> displays 'comic' | |
/comic/{$chapter_slug}/feed/ -> displays all comic posts for a chapter? | |
/comic/{$year}/ -> displays all comic posts for that year | |
/comic/{$year}/{$month}/ -> displays all comic posts for that year/month | |
/comic/{$year}/{$month}/{$day}/ -> displays all comic posts for that year/month/day | |