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 | |
/** | |
* 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 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 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 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 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 | |
/** | |
* Integrate Imager.js with WordPress | |
* | |
* Imager.js is BBC's solution for serving responsive and retina images, without | |
* the double payload issues that affect other solutions. For more information: | |
* | |
* https://github.com/BBC-News/Imager.js/ | |
* | |
* This collection of functions modifies the output of WordPress's |
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
function random_lipsum($amount = 1, $what = 'paras') { | |
$start = rand(0,30); | |
return simplexml_load_file("http://www.lipsum.com/feed/xml?amount=$amount&what=$what&start=$start")->lipsum; | |
} |
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 | |
/* | |
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 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
function jp_sort_download_archives( $query ) { | |
if ( is_tax( array( 'download_category', 'download_tag' ) ) && $query->is_main_query() ): | |
$query->set( 'orderby', 'title' ); | |
$query->set( 'order', 'ASC' ); | |
endif; | |
} | |
add_action( 'pre_get_posts', 'jp_sort_download_archives' ); |
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 | |
/** | |
* Remove the Marketify edd_login redirect | |
*/ | |
function jp_fix_marketify_edd_shortcode() { | |
remove_filter( 'shortcode_atts_edd_login', 'marketify_shortcode_atts_edd_login' ); | |
} | |
add_action( 'init', 'jp_fix_marketify_edd_shortcode' ); |
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: Easy Digital Downloads - Change Purchase Receipt Heading | |
* Description: Changes the Default Template purchase receipt heading from "Purchase Receipt" to "Download Confirmation". | |
*/ | |
function jp_filter_email_heading( $headers, $payment_id, $payment_data ) { | |
EDD()->emails->__set( 'heading', 'Download Confirmation' ); | |
return $headers; | |
} |
OlderNewer