From 9f9f2bcf13de7975a7f3ffa269293b4dcf648193 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 9 Jul 2012 17:28:55 +0000 Subject: [PATCH] Use is_main_query() method, rather than the function. Only decode the search query variable if we are executing the main query and it came from the /search/ base, rather than the query string. fixes #13961. git-svn-id: https://develop.svn.wordpress.org/trunk@21248 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 68093b69b5..e976cdf096 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2177,7 +2177,7 @@ class WP_Query { if ( !empty($q['s']) ) { // added slashes screw with quote grouping when done early, so done later $q['s'] = stripslashes($q['s']); - if ( empty( $_GET['s'] ) && is_main_query() ) + if ( empty( $_GET['s'] ) && $this->is_main_query() ) $q['s'] = urldecode($q['s']); if ( !empty($q['sentence']) ) { $q['search_terms'] = array($q['s']);