diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-01-02 16:00:05 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-01-02 16:00:05 +0000 |
| commit | 1503e05616c295e6f980134dc341fa1a66dc9672 (patch) | |
| tree | b0a7dc356affec0059670603f1cb990da7dbc026 /wp-includes/query.php | |
| parent | c65d51fec1d641efd1ec8a44c046cd54d588fe3b (diff) | |
Merge with WP 2.3.2
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1172 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/query.php')
| -rw-r--r-- | wp-includes/query.php | 8 |
1 files changed, 4 insertions, 4 deletions
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-') ) {
|
