Last active
November 3, 2016 22:25
-
-
Save kraftbj/cb7ee6cf20c7b965d283266b4d2fcecc to your computer and use it in GitHub Desktop.
Change jetpack to 10min
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 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