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: http://core.svn.wordpress.org/trunk@21248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
878db9bd76
commit
cc06e13817
|
@ -2177,7 +2177,7 @@ class WP_Query {
|
||||||
if ( !empty($q['s']) ) {
|
if ( !empty($q['s']) ) {
|
||||||
// added slashes screw with quote grouping when done early, so done later
|
// added slashes screw with quote grouping when done early, so done later
|
||||||
$q['s'] = stripslashes($q['s']);
|
$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']);
|
$q['s'] = urldecode($q['s']);
|
||||||
if ( !empty($q['sentence']) ) {
|
if ( !empty($q['sentence']) ) {
|
||||||
$q['search_terms'] = array($q['s']);
|
$q['search_terms'] = array($q['s']);
|
||||||
|
|
Loading…
Reference in New Issue