diff options
author | Yury German <blueknight@gentoo.org> | 2019-05-22 01:01:36 -0400 |
---|---|---|
committer | Yury German <blueknight@gentoo.org> | 2019-05-22 01:01:36 -0400 |
commit | 0914c92da22824025992c368c745546e41fbeb84 (patch) | |
tree | 965f6adf3b725e56d559fe4a93eff02281499dcc /plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php | |
parent | Deleting plugins for update (diff) | |
download | blogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.tar.gz blogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.tar.bz2 blogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.zip |
Adding Plugins
Updating the following
akismet.4.1.2, google-authenticator.0.52, jetpack.7.3.1
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php')
-rw-r--r-- | plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php b/plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php new file mode 100644 index 00000000..04d6c5dd --- /dev/null +++ b/plugins/jetpack/sync/class.jetpack-sync-module-wp-super-cache.php @@ -0,0 +1,79 @@ +<?php + +class Jetpack_Sync_Module_WP_Super_Cache extends Jetpack_Sync_Module { + + public function __construct() { + add_filter( 'jetpack_sync_constants_whitelist', array( $this, 'add_wp_super_cache_constants_whitelist' ), 10 ); + add_filter( 'jetpack_sync_callable_whitelist', array( $this, 'add_wp_super_cache_callable_whitelist' ), 10 ); + } + + static $wp_super_cache_constants = array( + 'WPLOCKDOWN', + 'WPSC_DISABLE_COMPRESSION', + 'WPSC_DISABLE_LOCKING', + 'WPSC_DISABLE_HTACCESS_UPDATE', + 'ADVANCEDCACHEPROBLEM', + ); + + static $wp_super_cache_callables = array( + 'wp_super_cache_globals' => array( 'Jetpack_Sync_Module_WP_Super_Cache', 'get_wp_super_cache_globals' ), + ); + + public function name() { + return 'wp-super-cache'; + } + + public static function get_wp_super_cache_globals() { + global $wp_cache_mod_rewrite; + global $cache_enabled; + global $super_cache_enabled; + global $ossdlcdn; + global $cache_rebuild_files; + global $wp_cache_mobile; + global $wp_super_cache_late_init; + global $wp_cache_anon_only; + global $wp_cache_not_logged_in; + global $wp_cache_clear_on_post_edit; + global $wp_cache_mobile_enabled; + global $wp_super_cache_debug; + global $cache_max_time; + global $wp_cache_refresh_single_only; + global $wp_cache_mfunc_enabled; + global $wp_supercache_304; + global $wp_cache_no_cache_for_get; + global $wp_cache_mutex_disabled; + global $cache_jetpack; + global $cache_domain_mapping; + + return array( + 'wp_cache_mod_rewrite' => $wp_cache_mod_rewrite, + 'cache_enabled' => $cache_enabled, + 'super_cache_enabled' => $super_cache_enabled, + 'ossdlcdn' => $ossdlcdn, + 'cache_rebuild_files' => $cache_rebuild_files, + 'wp_cache_mobile' => $wp_cache_mobile, + 'wp_super_cache_late_init' => $wp_super_cache_late_init, + 'wp_cache_anon_only' => $wp_cache_anon_only, + 'wp_cache_not_logged_in' => $wp_cache_not_logged_in, + 'wp_cache_clear_on_post_edit' => $wp_cache_clear_on_post_edit, + 'wp_cache_mobile_enabled' => $wp_cache_mobile_enabled, + 'wp_super_cache_debug' => $wp_super_cache_debug, + 'cache_max_time' => $cache_max_time, + 'wp_cache_refresh_single_only' => $wp_cache_refresh_single_only, + 'wp_cache_mfunc_enabled' => $wp_cache_mfunc_enabled, + 'wp_supercache_304' => $wp_supercache_304, + 'wp_cache_no_cache_for_get' => $wp_cache_no_cache_for_get, + 'wp_cache_mutex_disabled' => $wp_cache_mutex_disabled, + 'cache_jetpack' => $cache_jetpack, + 'cache_domain_mapping' => $cache_domain_mapping, + ); + } + + public function add_wp_super_cache_constants_whitelist( $list ) { + return array_merge( $list, self::$wp_super_cache_constants ); + } + + public function add_wp_super_cache_callable_whitelist( $list ) { + return array_merge( $list, self::$wp_super_cache_callables ); + } +} |