Skip to content

Instantly share code, notes, and snippets.

@kraftbj
Last active November 3, 2016 22:25
Show Gist options
  • Save kraftbj/cb7ee6cf20c7b965d283266b4d2fcecc to your computer and use it in GitHub Desktop.
Save kraftbj/cb7ee6cf20c7b965d283266b4d2fcecc to your computer and use it in GitHub Desktop.
Change jetpack to 10min
<?php //remove in an existing file
add_filter( 'cron_schedules', 'jp_support_sync_schedule' );
function jp_support_sync_schedule( $schedules ) {
if ( ! isset( $schedules['10min'] ) ) {
$schedules['10min'] = array(
'interval' => 10 * MINUTE_IN_SECONDS,
'display' => __( 'Every 10 minutes' ),
);
}
return $schedules;
}
function __return_jp_support_10_min() {
return '10min';
}
add_filter( 'jetpack_sync_incremental_sync_interval', '__return_jp_support_10_min' );
add_filter( 'jetpack_sync_full_sync_interval', '__return_jp_support_10_min' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment