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: Eliminate Plugin Clutter | |
Plugin URI: http://mikeschinkel.com/wordpress-plugins/eliminate-plugin-clutter/ | |
Description: Provides an "Archiving" feature that allows you to clear currently unused plugins from view without having to delete them yet having all of your archived plugins only one "Unarchive" click away. | |
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
<?php | |
/* | |
* test-get-comment-replies.php | |
* | |
* Returns a comment object for a given comment ID annotated with "reply_count" and "replies" properties: | |
* | |
* reply_count: count of all replies including sum of child replies. | |
* replies: array of child comment objects also annotated with "reply_count" and "replies" properties, recursively. | |
* | |
* Examples: |
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 | |
/* | |
PostsByLatestCommentQuery class that extends WP_Query and sorts posts by latest comment | |
Author: Mike Schinkel (http://mikeschinkel.com) | |
Just drop this example into the root of your website and call directly to see it work. | |
Use the class in your plugins or themes. | |
See: http://lists.automattic.com/pipermail/wp-hackers/2010-September/035113.html |
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
switch (n) | |
{ | |
case 0: | |
echo "You typed zero."; | |
case 1: | |
case 4: | |
case 9: | |
echo "n is a perfect square."; | |
case 2: | |
echo "n is an even number."; |
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
case (n) | |
{ | |
when 0: | |
echo "You typed zero."; | |
when 1: | |
when 4: | |
when 9: | |
echo "n is a perfect square."; | |
when 2: | |
echo "n is an even number."; |
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 | |
/* | |
* Adds "tax_terms" to WP_Query() | |
* | |
* See: http://lists.automattic.com/pipermail/wp-hackers/2010-October/035258.html | |
* | |
* Author: Mike Schinkel (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
<?php | |
/* | |
latest-post-per-post-type-query.php | |
LatestPostPerPostTypeQuery class that extends WP_Query and provides the latest post for each post type passed | |
Author: Mike Schinkel (http://mikeschinkel.com) | |
Just drop this example into the root of your website and call directly to see it work. |
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 | |
/* | |
blog-from-flickr.php | |
Allows the WordPress blog owner to blog a recent photo from a Flickr Photoset just by clicking a button. | |
Author: Mike Schinkel (http://mikeschinkel.com) | |
Just drop this example into the root of your website and call directly to see it work. |
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 | |
/* | |
Adds Post Counts by Post Type per User in the User List withing WordPress' Admin console (URL path => /wp-admin/users.php) | |
Written for: http://wordpress.stackexchange.com/questions/3233/showing-users-post-counts-by-custom-post-type-in-the-admins-user-list | |
By: Mike Schinkel (http://mikeschinkel.com) | |
Date: 24 October 2010 | |
*/ |
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 | |
/* | |
posts-by-category-with-price.php | |
Query for a list of WordPress posts by category, | |
but only those with a postmeta->meta_key='Price' that's >0 and NOT NULL. | |
Author: Mike Schinkel (http://mikeschinkel.com) |