From 1c55a42fa03f8a9a6c32209b54427127b517bbe9 Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 14 Dec 2009 00:38:05 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 16 ---------------- wp-settings.php | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index cb04b6af87..ea3e680fc2 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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. * diff --git a/wp-settings.php b/wp-settings.php index 0ca577edf3..9ab9a69060 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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;