Better is_admin() check from filosofo and pishmishy. fixes #5487 for 2.3

git-svn-id: http://svn.automattic.com/wordpress/branches/2.3@6442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-12-21 01:28:48 +00:00
parent 9495e906d7
commit a1adf4e349
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,6 @@
<?php
define('WP_ADMIN', TRUE);
if ( defined('ABSPATH') )
require_once( ABSPATH . 'wp-config.php');
else

View File

@ -32,9 +32,9 @@ function wp_reset_query() {
*/
function is_admin () {
global $wp_query;
return ($wp_query->is_admin || (stripos($_SERVER['REQUEST_URI'], 'wp-admin/') !== false));
if ( defined('WP_ADMIN') )
return WP_ADMIN;
return false;
}
function is_archive () {