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:
parent
2ec76f2801
commit
2c6e4421b4
@ -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 () {
|
||||
|
Loading…
Reference in New Issue
Block a user