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
This commit is contained in:
Sergey Biryukov 2014-06-30 17:19:14 +00:00
parent e1db9240b7
commit ca650bd79c
1 changed files with 2 additions and 2 deletions

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