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 Silent Flush | |
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten. | |
* Version: 2013.05.04 | |
* 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 | |
class Wpse_Datepicker_Example extends Wpse_Plugin_Options_Page | |
{ | |
protected $title = 'jQuery Date Picker'; | |
protected $menu_slug = 'wpse_datepicker'; | |
protected $option = 'wpse_datepicker'; | |
protected $scripts = array ( 'jquery-ui-datepicker' ); | |
// not inherited | |
public static function get_instance() |
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 -*- | |
/* | |
* Place the following code in the main plugin file (the one with the plugin | |
* headers) to stop upgrade notices for this plugin. | |
*/ | |
if ( ! function_exists( 't5_no_upgrade_check' ) ) | |
{ | |
add_filter( 'http_request_args', 't5_no_upgrade_check', 5, 2 ); |
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 Spam Block | |
* Description: Block spam before it reaches the database. | |
* Plugin URI: https://github.com/toscho/T5-Spam-Block | |
* Version: 2013.03.31 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* Licence: MIT | |
* License URI: http://opensource.org/licenses/MIT |
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
add_action( 'wp_footer', 'count_statuses' ); | |
function count_statuses() | |
{ | |
$status = 'status'; | |
$num = get_term_post_count_by_type( "post-format-$status", 'post_format' ); | |
print "<pre>{$status}es: $num</pre>"; | |
} | |
/** | |
* Count all post in a term. |
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 New Comments In Right Now Dashboard | |
* Description: Show the number of new comments on the Right Now dashboard | |
* Plugin URI: | |
* Version: 2013.03.16 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* Licence: MIT | |
* License URI: http://opensource.org/licenses/MIT |
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 | |
/** | |
* List of language codes and their names (native and English) | |
* | |
* Usage: | |
* $languages = require_once "language-list.php"; | |
* | |
* @source http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes | |
* @version 2013.03.14 | |
* @author Thomas Scholz <info@toscho.de> |
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
// ==UserScript== | |
// @name Remove tabindex attributes | |
// @namespace remove-tabindex-toscho | |
// @description Removes all tabindex attributes | |
// @author Thomas Scholz | |
// ==/UserScript== | |
if ( tabFucked = document.querySelectorAll( "[tabindex]" ) ) { | |
for ( var i = 0, max = tabFucked.length; i < max; i++ ) { | |
if ( 0 != tabFucked[i].getAttribute( "tabindex" ) ) |
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: T5 Head Meta | |
* Description: Meta data for head element | |
* Plugin URI: | |
* Version: 2013.04.08 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* Licence: MIT | |
* License URI: http://opensource.org/licenses/MIT |
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: T5 Inspect Queries | |
* Description: Adds a list of all queries at the end of each file. | |
* | |
* Add the following to your wp-config.php: | |
define( 'WP_DEBUG', TRUE ); | |
define( 'SAVEQUERIES', TRUE ); |