From 1503e05616c295e6f980134dc341fa1a66dc9672 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 2 Jan 2008 16:00:05 +0000 Subject: Merge with WP 2.3.2 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1172 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/query.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wp-includes/query.php') diff --git a/wp-includes/query.php b/wp-includes/query.php index 61a78f6..82f0807 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -32,9 +32,9 @@ function wp_reset_query() { */ function is_admin () { - global $wp_query; - - return ($wp_query->is_admin || (stripos($_SERVER['REQUEST_URI'], 'wp-admin/') !== false)); + if ( defined('WP_ADMIN') ) + return WP_ADMIN; + return false; } function is_archive () { @@ -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-') ) { -- cgit