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
This commit is contained in:
Sergey Biryukov 2014-06-30 17:18:23 +00:00
parent 4f7bc0410f
commit 4e56aa8da0

View File

@ -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'] );
}