Fix is_admin() for situations where the query is not run. fixes #1741
git-svn-id: http://svn.automattic.com/wordpress/trunk@3286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
157aecdf6e
commit
e6bcf0632d
|
@ -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