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:
parent
b300deaf01
commit
1c55a42fa0
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -307,6 +307,22 @@ function wp_clone( $object ) {
|
|||
return $can_clone ? clone( $object ) : $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) {
|
||||
require_once (WP_CONTENT_DIR . '/object-cache.php');
|
||||
$_wp_using_ext_object_cache = true;
|
||||
|
|
Loading…
Reference in New Issue