diff options
Diffstat (limited to 'plugins/jetpack/class.jetpack-admin.php')
-rw-r--r-- | plugins/jetpack/class.jetpack-admin.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/jetpack/class.jetpack-admin.php b/plugins/jetpack/class.jetpack-admin.php index 13f5d18f..12195dc0 100644 --- a/plugins/jetpack/class.jetpack-admin.php +++ b/plugins/jetpack/class.jetpack-admin.php @@ -15,12 +15,21 @@ class Jetpack_Admin { private $jetpack; static function init() { + if( isset( $_GET['page'] ) && $_GET['page'] === 'jetpack' ) { + add_filter( 'nocache_headers', array( 'Jetpack_Admin', 'add_no_store_header' ), 100 ); + } + if ( is_null( self::$instance ) ) { self::$instance = new Jetpack_Admin; } return self::$instance; } + static function add_no_store_header( $headers ) { + $headers['Cache-Control'] .= ', no-store'; + return $headers; + } + private function __construct() { $this->jetpack = Jetpack::init(); @@ -184,7 +193,12 @@ class Jetpack_Admin { if ( Jetpack::is_development_mode() ) { return ! ( $module['requires_connection'] ); } else { - return Jetpack::is_active(); + if ( ! Jetpack::is_active() ) { + return false; + } + + $plan = Jetpack::get_active_plan(); + return in_array( $module['module'], $plan['supports'] ); } } |