diff --git a/wp-includes/query.php b/wp-includes/query.php index 3cf87c50bc..fae84ce818 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -644,7 +644,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-') ) {