WordPress.org

Make WordPress Core

Changeset 16886


Ignore:
Timestamp:
12/12/2010 04:38:51 PM (9 years ago)
Author:
scribu
Message:

Set $wp_query->tax_query earlier. See #15752

File:
1 edited

Legend:

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

    r16880 r16886  
    13561356            }
    13571357
    1358             $tax_query_obj = $this->parse_tax_query( $qv );
    1359 
    1360             foreach ( $tax_query_obj->queries as $tax_query ) {
     1358            $this->parse_tax_query( $qv );
     1359            foreach ( $this->tax_query->queries as $tax_query ) {
    13611360                if ( 'IN' == $tax_query['operator'] ) {
    13621361                    switch ( $tax_query['taxonomy'] ) {
     
    13721371                }
    13731372            }
    1374 
    1375             unset( $tax_query_obj, $tax_query );
     1373            unset( $tax_query );
    13761374
    13771375            _parse_meta_query( $qv );
     
    14951493     *
    14961494     * @param array &$q The query variables
    1497      * @return WP_Tax_Query
    14981495     */
    14991496    function parse_tax_query( &$q ) {
     
    16021599        }
    16031600
    1604         return new WP_Tax_Query( $tax_query );
     1601        $this->tax_query = new WP_Tax_Query( $tax_query );
    16051602    }
    16061603
     
    19371934
    19381935        // Taxonomies
    1939         $this->tax_query = $this->parse_tax_query( $q );
     1936        $this->parse_tax_query( $q );
    19401937
    19411938        if ( $this->is_category || $this->is_tag || $this->is_tax ) {
Note: See TracChangeset for help on using the changeset viewer.