Move is_admin check to a more appropriate place.

see #11330.
Built from https://develop.svn.wordpress.org/trunk@28668


git-svn-id: http://core.svn.wordpress.org/trunk@28486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-04 23:47:15 +00:00
parent b33c95079b
commit f598eaa89b
1 changed files with 2 additions and 2 deletions

View File

@ -1512,7 +1512,7 @@ class WP_Query {
} else {
// Look for archive queries. Dates, categories, authors, search, post type archives.
if ( ! is_admin() & isset( $this->query['s'] ) ) {
if ( isset( $this->query['s'] ) ) {
$this->is_search = true;
}
@ -2482,7 +2482,7 @@ class WP_Query {
// If a search pattern is specified, load the posts that match.
if ( ! empty( $q['s'] ) ) {
$search = $this->parse_search( $q );
} elseif ( $this->is_search ) {
} elseif ( ! $this->is_admin && $this->is_search ) {
$search = ' AND 0';
}