From f598eaa89b3e5a84c9125b8782ccdab573d6cef8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 4 Jun 2014 23:47:15 +0000 Subject: [PATCH] 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 --- wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 1fab7a2b6b..b206a162e0 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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'; }