Move is_admin() to wp-settings.php so it's available when query.php is not included.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -86,22 +86,6 @@ function wp_reset_query() {
|
||||
* Query type checks.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether the current request is in WordPress admin Panel
|
||||
*
|
||||
* Does not inform on whether the user is an admin! Use capability checks to
|
||||
* tell if the user should be accessing a section or not.
|
||||
*
|
||||
* @since 1.5.1
|
||||
*
|
||||
* @return bool True if inside WordPress administration pages.
|
||||
*/
|
||||
function is_admin () {
|
||||
if ( defined('WP_ADMIN') )
|
||||
return WP_ADMIN;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is query requesting an archive page.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user