diff options
Diffstat (limited to 'plugins/jetpack/class.frame-nonce-preview.php')
-rw-r--r-- | plugins/jetpack/class.frame-nonce-preview.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/jetpack/class.frame-nonce-preview.php b/plugins/jetpack/class.frame-nonce-preview.php index 19c0f220..55de1e1e 100644 --- a/plugins/jetpack/class.frame-nonce-preview.php +++ b/plugins/jetpack/class.frame-nonce-preview.php @@ -27,7 +27,7 @@ class Jetpack_Frame_Nonce_Preview { } // autosave previews are validated differently - if ( isset( $_GET[ 'frame-nonce' ] ) && isset( $_GET[ 'preview_id' ] ) && isset( $_GET[ 'preview_nonce' ] ) ) { + if ( isset( $_GET['frame-nonce'] ) && isset( $_GET['preview_id'] ) && isset( $_GET['preview_nonce'] ) ) { remove_action( 'init', '_show_post_preview' ); add_action( 'init', array( $this, 'handle_autosave_nonce_validation' ) ); } @@ -41,11 +41,10 @@ class Jetpack_Frame_Nonce_Preview { * @return bool */ public function is_frame_nonce_valid() { - if ( empty( $_GET[ 'frame-nonce' ] ) ) { + if ( empty( $_GET['frame-nonce'] ) ) { return false; } - Jetpack::load_xml_rpc_client(); $xml = new Jetpack_IXR_Client(); $xml->query( 'jetpack.verifyFrameNonce', sanitize_key( $_GET['frame-nonce'] ) ); @@ -106,7 +105,6 @@ class Jetpack_Frame_Nonce_Preview { * Handle validation for autosave preview request * * @since 4.7.0 - * */ public function handle_autosave_nonce_validation() { if ( ! $this->is_frame_nonce_valid() ) { |