Move is_admin check to a more appropriate place.

see #11330.

git-svn-id: https://develop.svn.wordpress.org/trunk@28668 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-06-04 23:46:39 +00:00
parent 0b5eac467f
commit d33d83495c

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';
}