Prevent admin breakage for s in WP_Query after [28623].

See #11330.



git-svn-id: https://develop.svn.wordpress.org/trunk@28666 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-06-04 20:02:46 +00:00
parent 577d223715
commit 2948b6d35a

View File

@ -1512,7 +1512,7 @@ class WP_Query {
} else { } else {
// Look for archive queries. Dates, categories, authors, search, post type archives. // Look for archive queries. Dates, categories, authors, search, post type archives.
if ( isset( $this->query['s'] ) ) { if ( ! is_admin() & isset( $this->query['s'] ) ) {
$this->is_search = true; $this->is_search = true;
} }
@ -2483,7 +2483,7 @@ class WP_Query {
if ( ! empty( $q['s'] ) ) { if ( ! empty( $q['s'] ) ) {
$search = $this->parse_search( $q ); $search = $this->parse_search( $q );
} elseif ( $this->is_search ) { } elseif ( $this->is_search ) {
$search = 'AND 0'; $search = ' AND 0';
} }
/** /**