jetpack_sync_cron_start_time_offset

Allows overriding the offset that the sync cron jobs will first run.

Description

apply_filters( 'jetpack_sync_cron_start_time_offset', (int) $start_time_offset, (string) $hook, (string) $schedule ); 

This can be useful when scheduling cron jobs across multiple sites in a network.

Parameters (3)

0. $start_time_offset (int)
The start time offset.
1. $hook (string)
The hook.
2. $schedule (string)
The schedule.

Usage

To run the hook, copy the example below.
  1. $start_time_offset = apply_filters( 'jetpack_sync_cron_start_time_offset', $start_time_offset, $hook, $schedule ); 
  2.  
  3. if ( !empty( $start_time_offset ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_sync_cron_start_time_offset callback 
  2. function filter_jetpack_sync_cron_start_time_offset( $start_time_offset, $hook, $schedule ) { 
  3. // make filter magic happen here... 
  4. return $start_time_offset
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_sync_cron_start_time_offset', 'filter_jetpack_sync_cron_start_time_offset', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_sync_cron_start_time_offset', 'filter_jetpack_sync_cron_start_time_offset', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/sync/class.jetpack-sync-actions.php  
  1. return intval( apply_filters(