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: Hook Debug Output | |
* Plugin URI: http://unserkaiser.com | |
* Description: Debug Hooked filter callback functions with adding <code>?debug=secret&hook=your_hook_name</code> to the URl | |
* Version: 0.1 | |
* Author: Stephen Harris, Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
*/ | |
// Prevent loading this file directly - Busted! |
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 | |
/* | |
* Get all users registered after $start and before $end (dates in yyyy-mm-dd format) | |
* | |
* Based on my answer to this question: http://wordpress.stackexchange.com/questions/51485/how-can-i-query-all-users-who-registered-today/51492#51492 | |
* | |
* @param (string) $start - start date in yyyy-mm-dd format | |
* @param (string) $end - end date in yyyy-mm-dd format | |
*/ |
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 | |
/* | |
* Gets IDs of the previous and next siblings (pages with the same parent as current post). | |
* Then uses wpse5422_display_prev_next to display links to them | |
* Must be used inside the loop. | |
* | |
* This is my solution to: http://wordpress.stackexchange.com/a/54463/9364 | |
*/ | |
function wpse5422_the_page_siblings(){ | |
$post_id = get_the_ID(); |
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 | |
/* | |
* Provides a function to add a 'publish' link to posts. | |
* Use sh_frontend_publish() to display the link | |
* | |
*/ | |
function sh_frontend_publish(){ | |
$post_id = get_the_ID(); | |
if( 'draft' == get_post_status($post_id) && current_user_can('edit_post',$post_id) && current_user_can('publish_posts') ){ |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Toolbar hooks | |
* Description: Adds a toolbar item with the current page hooks. | |
* Version: 2012.06.19 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
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: SH Which Template Is This | |
* Description: Prints in the footer the template being used for that page. | |
* Author: Stephen Harris contact@stephenharris.info | |
* Author URI: http://stephenharris.info | |
* License: GPL | |
* License URI: http://www.gnu.org/copyleft/gpl.html | |
*/ | |
class SH_Which_Template_Is_This{ |
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 | |
/** | |
* Template Name: Venue Archive | |
* Description: A page template that lists venues with Event Organiser. Just a simple example of what | |
* you can do. | |
* @link http://www.stephenharris.info/2012/taxonomy-archives-and-venue-pages-in-event-organiser/ Related Tutorial | |
* | |
* You can add this to your theme and then create a page, selecting it as the page template. The 'content' you enter is ignored, but you could edit this to include that too. | |
*/ |
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
/** | |
* This is a code snippet that will work with Event Organiser 1.6+ | |
* At time of writing 1.6 is still in beta. | |
* This should go in a separate plug-in or functions.php | |
* Do not change the Event Organiser files - changes to EO will be lost when you upgrade. | |
* | |
* This code snippet replaces a link on the widget calendar with one that points to the a | |
* category for one of the events running on that date. It priorities the term 'foobar'. | |
* The link appends ?ondate=[some-date] to filter by events active on that date (i.e. | |
* the date on the calendar) |
OlderNewer