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
This commit is contained in:
Ryan Boren 2005-12-10 23:29:39 +00:00
parent 2ec76f2801
commit 2c6e4421b4
1 changed files with 1 additions and 1 deletions

View File

@ -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 () {