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: Batcache Manager | |
Plugin URI: http://wordpress.org/extend/plugins/batcache/ | |
Description: This optional plugin improves Batcache. | |
Author: Andy Skelton | |
Author URI: http://andyskelton.com/ | |
Version: 1.3 | |
*/ | |
global $batcache, $wp_object_cache; |
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
callback: function ( elem, op ) { | |
if( op === 'load' ) { | |
if (elem.getAttribute('data-echo-srcset') !== null) { | |
elem.setAttribute('srcset', elem.getAttribute('data-echo-srcset')); | |
} | |
} | |
} |
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
/** | |
* Retrieve site option value based on name of option. | |
* | |
* @since 2.8.0 | |
* | |
* @see get_option() | |
* | |
* @global wpdb $wpdb | |
* | |
* @param string $option Name of option to retrieve. Expected to not be SQL-escaped. |
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: Advanced Nav Caching | |
Description: Cache nav output | |
Version: 1.0.0 | |
Author: Spacedmonkey | |
*/ | |
class Advanced_Nav_Cache { |
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 | |
class jQuery_CDN { | |
/** | |
* @var int | |
*/ | |
private $jquery_version = 0; | |
/** | |
* @var int | |
*/ |
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
foreach ( $collection as $term ){ | |
$term_post = get_post( $term->name ); | |
if( is_a( $term_post, 'WP_Post' ) && $term_post->post_status == 'publish'){ | |
$term->post = $term_post; | |
} | |
} |
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
function change_aggregator_remote_get_url($url){ | |
$parse = parse_url($url); | |
return str_replace($parse['host'], "localhost", $url); | |
} | |
add_filter('aggregator_remote_get_url', 'change_aggregator_remote_get_url'); | |
function change_aggregator_remote_get_args($args, $url){ | |
$parse = parse_url($url); |
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
// Ping the cron on the portal site to trigger term import now | |
$portal_site_url = get_home_url( $sync_destination ); | |
$portal_site_url = apply_filters('aggregator_remote_get_url', $portal_site_url); | |
$args = array( | |
'blocking' => false, | |
'timeout' => WP_CRON_LOCK_TIMEOUT | |
); | |
$args = apply_filters('aggregator_remote_get_args', $args, $portal_site_url); |
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
$script_tag = "<script type='text/javascript' src='%s'></script>\n"; | |
/** | |
* Filter the script tag. | |
* | |
* @since 4.1.0 | |
* | |
* @param string $script_tag Script tag. | |
* @param string $src Source of script. | |
* @param string $handle Script handle. | |
* @param boolean $concat Is concat |
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 | |
/** | |
* Manage posts terms. | |
* | |
* @package wp-cli | |
*/ | |
class Post_Terms_Command extends \WP_CLI\CommandWithDBObject { | |
protected $obj_type = 'post terms for'; |