WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/17/2010 01:56:01 AM (9 years ago)
Author:
scribu
Message:

Optimize get_tax_sql(). See #12891

File:
1 edited

Legend:

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

    r16404 r16413  
    19341934        $q['tax_query'] = $this->parse_tax_query( $q );
    19351935        if ( !empty( $q['tax_query'] ) ) {
     1936            $clauses = call_user_func_array( 'get_tax_sql', array( $q['tax_query'], $wpdb->posts, 'ID', &$this) );
     1937
     1938            $join .= $clauses['join'];
     1939            $where .= $clauses['where'];
     1940
    19361941            if ( empty($post_type) ) {
    19371942                $post_type = 'any';
     
    19401945                $post_status_join = true;
    19411946            }
    1942 
    1943             $where .= get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
    19441947
    19451948            // Back-compat
Note: See TracChangeset for help on using the changeset viewer.