-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate jetpack_json_api_full_management setting in favor of this module.
- Loading branch information
Showing
3 changed files
with
32 additions
and
65 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* Module Name: Manage | ||
* Module Description: Manage all your sites from a centralized place, https://wordpress.com/sites. | ||
* Sort Order: 1 | ||
* First Introduced: 3.4 | ||
* Requires Connection: Yes | ||
* Module Tags: Centralized Management | ||
*/ | ||
|
||
add_action( 'jetpack_activate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); | ||
add_action( 'jetpack_deactivate_module_manage', array( Jetpack::init(), 'toggle_module_on_wpcom' ) ); | ||
|
||
$theme_slug = get_option( 'stylesheet' ); | ||
|
||
Jetpack_Sync::sync_options( __FILE__, | ||
'stylesheet', | ||
"theme_mods_{$theme_slug}", | ||
'jetpack_sync_non_public_post_stati' | ||
); | ||
|
||
if ( Jetpack_Options::get_option( 'sync_non_public_post_stati' ) ) { | ||
$sync_options = array( | ||
'post_types' => get_post_types( array( 'public' => true ) ), | ||
'post_stati' => get_post_stati(), | ||
); | ||
Jetpack_Sync::sync_posts( __FILE__, $sync_options ); | ||
} |