From 2c6e4421b4e5acdb3208f6302b19c065cb1dd206 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 10 Dec 2005 23:29:39 +0000 Subject: [PATCH] Fix is_admin() for situations where the query is not run. fixes #1741 git-svn-id: https://develop.svn.wordpress.org/trunk@3286 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index cbc764baa0..2fd087db53 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1519,7 +1519,7 @@ function is_trackback () { function is_admin () { global $wp_query; - return $wp_query->is_admin; + return ( $wp_query->is_admin || strstr($_SERVER['REQUEST_URI'], 'wp-admin/') ); } function is_home () {