This file contains hidden or 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 | |
| function ttf_get_make_stats() { | |
| // Make remote request to WP.org | |
| $response = wp_remote_post( | |
| 'http://api.wordpress.org/themes/info/1.0/', | |
| array( | |
| 'body' => array( | |
| 'action' => 'theme_information', | |
| 'request' => serialize( (object) array( |
This file contains hidden or 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 | |
| /* | |
| Usage: | |
| $frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
| if ( !$frag->output() ) { // NOTE, testing for a return of false | |
| functions_that_do_stuff_live(); | |
| these_should_echo(); | |
| // IMPORTANT | |
| $frag->store(); | |
| // YOU CANNOT FORGET THIS. If you do, the site will break. |
This file contains hidden or 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: EDD Readme Parsing Enhancements | |
| Description: Updates a Download's current version and change log fields when using the readme.txt parsing feature in Easy Digital Downloads. | |
| */ | |
| /** | |
| * Filters the EDD readme.txt parser response and updates the | |
| * download's current version and change log fields. | |
| */ |
This file contains hidden or 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 | |
| /** | |
| * Don't update this plugin | |
| * | |
| * This prevents you from being prompted to update if there's a public plugin | |
| * with the same name. | |
| * | |
| * @author Phil Wylie | |
| * @link http://link.from.pw/1cFfcFZ | |
| * @param array $r Request arguments |
This file contains hidden or 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: No "New WordPress Site" E-mail | |
| Description: Prevents the "New WordPress Site" e-mail from being sent out | |
| Version: 0.1 | |
| Author: Mark Jaquith | |
| Author URI: http://coveredwebservices.com/ | |
| */ | |
| class CWS_No_New_WordPress_Site_Email { |
This file contains hidden or 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
| #!/bin/bash | |
| # Created by Sindre Sorhus | |
| # Magically retrieves a GitHub users email even though it's not publicly shown | |
| [ "$1" = "" ] && echo "usage: $0 <GitHub username> [<repo>]" && exit 1 | |
| [ "$2" = "" ] && repo=`curl "https://api.github.com/users/$1/repos?type=owner&sort=updated" -s | sed -En 's|"name": "(.+)",|\1|p' | tr -d ' ' | head -n 1` || repo=$2 | |
| curl "https://api.github.com/repos/$1/$repo/commits" -s | sed -En 's|"(email\|name)": "(.+)",?|\2|p' | tr -s ' ' | paste - - | sort -u -k 1,1 |
This file contains hidden or 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: Instrument Hooks for WordPress | |
| Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook. | |
| Version: 0.1 | |
| Author: Mike Schinkel | |
| Author URI: http://mikeschinkel.com | |
| */ | |
| if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') { |
This file contains hidden or 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: MU plugins subdirectory loader | |
| * Plugin URI: https://gist.github.com/lavoiesl/6302907 | |
| * Description: Enables the loading of plugins sitting in mu-plugins (as folders) | |
| * Version: 0.1 | |
| * Author: github@lavoie.sl | |
| * Author URI: http://blog.lavoie.sl/ | |
| * |
This file contains hidden or 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: Plugin Class Demo | |
| * Description: How I am using the base class in plugins. | |
| * Plugin URI: | |
| * Version: 2012.09.29 | |
| * Author: Thomas Scholz | |
| * Author URI: http://toscho.de | |
| * License: GPL | |
| * Text Domain: plugin_unique_name |
This file contains hidden or 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 | |
| add_action( 'edit_form_after_editor', 'testing_accordion_section' ); | |
| function testing_accordion_section() { | |
| $screen = get_current_screen(); | |
| do_accordion_sections( $screen, 'normal', get_post() ); |