From ca650bd79c81470abe2cbeb8d928fd48eba77775 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Jun 2014 17:19:14 +0000 Subject: [PATCH] Replace a redundant ! is_preview() check with a more appropriate one. fixes #20496. Built from https://develop.svn.wordpress.org/trunk@28928 git-svn-id: http://core.svn.wordpress.org/trunk@28726 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/canonical.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 9365987651..b9547d824b 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -78,8 +78,8 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { if ( !isset($redirect['query']) ) $redirect['query'] = ''; - // If its not a preview then remove it from URL - if ( ! is_preview() ) { + // It's not a preview, so remove it from URL + if ( get_query_var( 'preview' ) ) { $redirect['query'] = remove_query_arg( 'preview', $redirect['query'] ); }