From 4e56aa8da088071203310eb34f5c7f2672c2e130 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Jun 2014 17:18:23 +0000 Subject: [PATCH] Replace a redundant ! is_preview() check with a more appropriate one. fixes #20496. git-svn-id: https://develop.svn.wordpress.org/trunk@28928 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/canonical.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php index 9365987651..b9547d824b 100644 --- a/src/wp-includes/canonical.php +++ b/src/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'] ); }