Commit 2811352d authored by Erick Hitter's avatar Erick Hitter Committed by GitHub
Browse files

Merge pull request #93 from Automattic/remove/sync-exclusion

Restore Jetpack Sync for CPT
parents 78877f3c 82d667e2
......@@ -29,10 +29,6 @@ class Cron_Options_CPT extends Singleton {
// Data storage
add_action( 'init', array( $this, 'register_post_type' ) );
// Prevent Jetpack from syncing plugin's CPT entries
add_filter( 'option_jetpack_sync_settings_post_types_blacklist', array( $this, 'exclude_from_jetpack_sync' ), 999 );
add_filter( 'default_option_jetpack_sync_settings_post_types_blacklist', array( $this, 'exclude_from_jetpack_sync' ), 999 );
// Option interception
add_filter( 'pre_option_cron', array( $this, 'get_option' ) );
add_filter( 'pre_update_option_cron', array( $this, 'update_option' ), 10, 2 );
......@@ -59,23 +55,6 @@ class Cron_Options_CPT extends Singleton {
}
}
/**
* Block Jetpack Sync from capturing plugin's data
*
* Data changes frequently and is of no value in any remote context
*/
public function exclude_from_jetpack_sync( $option_value ) {
if ( ! is_array( $option_value ) ) {
$option_value = array();
}
if ( ! in_array( self::POST_TYPE, $option_value ) ) {
$option_value[] = self::POST_TYPE;
}
return $option_value;
}
/**
* PLUGIN FUNCTIONALITY
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment