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 jetpackme_related_posts_date_restricted( $date_range, $post_id ) { | |
// We can change this based on $post_id too but let's just filter everything | |
$date_range = array( | |
'from' => strtotime( '1 January 2013' ), | |
'to' => time(), | |
); | |
return $date_range; | |
} | |
add_filter( 'jetpack_relatedposts_filter_date_range', 'jetpackme_related_posts_date_restricted', 10, 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 | |
// To disable the auto-activation of Jetpack's Widget Visibility module: | |
add_filter( 'jetpack_get_default_modules', 'disable_jetpack_widget_visibility_autoactivate' ); | |
function disable_jetpack_widget_visibility_autoactivate( $modules ) { | |
return array_diff( $modules, array( 'widget-visibility' ) ); | |
} | |
// Or, to disable the functionality in your own plugin if the user activates it in Jetpack: |
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 | |
/** | |
* When hooked to either the_content or the_excerpt filters, | |
* this should append the signature before the Jetpack sharing buttons | |
* are added, so long as the priority is 18 or less! | |
* (as Jetpack's sharing options go in at priority 19) | |
* | |
* @param string $content The post content as passed to the function | |
* @returns string The content with the author box appended to it. |