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
/** | |
* Load the plugin text domain for translation. | |
* | |
* @since 2.0 | |
*/ | |
public function load_plugin_textdomain() { | |
$domain = $this->plugin_slug; | |
$locale = apply_filters( 'plugin_locale', get_locale(), $domain ); | |
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 spacedmonkey_pages($old){ | |
$old['before'] = '<ul class="pagination"><li class="disabled"><span>Pages: </span></li>'; | |
$old['after'] = '</ul>'; | |
$old['link_before'] = '<span class="">'; | |
$old['link_after'] = '</span>'; | |
return $old; | |
} | |
add_filter( 'wp_link_pages_args', 'spacedmonkey_pages' ); |
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
/** | |
Change the wrapper of breadcrums to span to ul | |
**/ | |
function change_breadcrumb_output_wrapper($old){ | |
return "ul"; | |
} | |
add_filter( 'wpseo_breadcrumb_output_wrapper', 'change_breadcrumb_output_wrapper' ); | |
/** |
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 if ( function_exists('yoast_breadcrumb') ) { | |
yoast_breadcrumb('<nav class="breadcrumbs" role="navigation">','</nav>'); | |
} ?> |
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
/** | |
* Export users to a CSV file. | |
* | |
* ## OPTIONS | |
* | |
* <file> | |
* : The CSV file to export users to. | |
* | |
* ## EXAMPLES | |
* |
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'; |
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
// 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
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
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; | |
} | |
} |
OlderNewer