Use is_admin. Props markjaquith. see #5487

git-svn-id: http://svn.automattic.com/wordpress/trunk@6509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-12-28 01:04:17 +00:00
parent 0aa5bf4862
commit f635599744

View File

@ -644,7 +644,7 @@ class WP_Query {
if ('' != $qv['preview'])
$this->is_preview = true;
if ( strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false )
if ( is_admin() )
$this->is_admin = true;
if ( false !== strpos($qv['feed'], 'comments-') ) {