diff --git a/wp-includes/query.php b/wp-includes/query.php index 28db7ba31e..564c47b843 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -642,7 +642,7 @@ class WP_Query { if ('' != $qv['preview']) $this->is_preview = true; - if ( strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) + if ( is_admin() ) $this->is_admin = true; if ( false !== strpos($qv['feed'], 'comments-') ) {