diff --git a/wp-includes/query.php b/wp-includes/query.php index 28db7ba31eda..564c47b84338 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -642,7 +642,7 @@ function parse_query ($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-') ) {