Make WordPress Core

Changeset 21248


Ignore:
Timestamp:
07/09/2012 05:28:55 PM (12 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r21187 r21248  
    21782178            // added slashes screw with quote grouping when done early, so done later
    21792179            $q['s'] = stripslashes($q['s']);
    2180             if ( empty( $_GET['s'] ) && is_main_query() )
     2180            if ( empty( $_GET['s'] ) && $this->is_main_query() )
    21812181                $q['s'] = urldecode($q['s']);
    21822182            if ( !empty($q['sentence']) ) {
Note: See TracChangeset for help on using the changeset viewer.