diff --git a/modules/calypsoify/class.jetpack-calypsoify.php b/modules/calypsoify/class.jetpack-calypsoify.php index 048faf7a971be..6c069e7a6048b 100644 --- a/modules/calypsoify/class.jetpack-calypsoify.php +++ b/modules/calypsoify/class.jetpack-calypsoify.php @@ -36,6 +36,10 @@ public static function getInstance() { public function setup() { $this->is_calypsoify_enabled = 1 == (int) get_user_meta( get_current_user_id(), 'calypsoify', true ); + if ( isset( $_GET['calypsoify'] ) ) { + $this->is_calypsoify_enabled = (int) $_GET['calypsoify']; + } + add_action( 'admin_init', array( $this, 'check_param' ), 4 ); if ( $this->is_calypsoify_enabled ) { @@ -450,10 +454,6 @@ public function check_param() { } else { update_user_meta( get_current_user_id(), 'calypsoify', 0 ); } - - $page = remove_query_arg( 'calypsoify', wp_basename( $_SERVER['REQUEST_URI'] ) ); - - wp_safe_redirect( admin_url( $page ) ); } }