jetpack_sync_idc_optin

Allows sites to optin to IDC mitigation which blocks the site from syncing to WordPress.com when the home URL or site URL do not match what WordPress.com expects.

Description

apply_filters( 'jetpack_sync_idc_optin', (bool) $default ); 

The default value is either false, or the value of JETPACK_SYNC_IDC_OPTIN constant if set.

Parameters (1)

0. $default (bool)
Whether the site is opted in to IDC mitigation.

Usage

To run the hook, copy the example below.
  1. $default = apply_filters( 'jetpack_sync_idc_optin', $default ); 
  2.  
  3. if ( !empty( $default ) ) { 
  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_idc_optin callback 
  2. function filter_jetpack_sync_idc_optin( $default ) { 
  3. // make filter magic happen here... 
  4. return $default
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_sync_idc_optin', 'filter_jetpack_sync_idc_optin', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_sync_idc_optin', 'filter_jetpack_sync_idc_optin', 10, 1 ); 

Defined (1)

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

/class.jetpack.php  
  1. return (bool) apply_filters( 'jetpack_sync_idc_optin', $default );