Changeset 16849 for trunk/wp-includes/query.php
- Timestamp:
- 12/09/2010 07:29:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16844 r16849 715 715 * @since 3.1.0 716 716 * @access public 717 * @var array718 */ 719 var $tax_query = array();717 * @var object WP_Tax_Query 718 */ 719 var $tax_query; 720 720 721 721 /** … … 1585 1585 } 1586 1586 1587 _set_tax_query_defaults( $tax_query ); 1588 1589 foreach ( $tax_query as $query ) { 1590 if ( ! is_array( $query ) ) 1591 continue; 1592 1587 $tax_query_obj = new WP_Tax_Query( $tax_query ); 1588 1589 foreach ( $tax_query_obj->queries as $query ) { 1593 1590 if ( 'IN' == $query['operator'] ) { 1594 1591 switch ( $query['taxonomy'] ) { … … 1605 1602 } 1606 1603 1607 return $tax_query ;1604 return $tax_query_obj; 1608 1605 } 1609 1606 … … 1943 1940 $this->tax_query = $this->parse_tax_query( $q ); 1944 1941 1945 $clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this));1942 $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' ); 1946 1943 1947 1944 $join .= $clauses['join']; … … 1958 1955 1959 1956 // Back-compat 1960 $tax_query_in = wp_list_filter( $this->tax_query , array( 'operator' => 'IN' ) );1957 $tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) ); 1961 1958 if ( !empty( $tax_query_in ) ) { 1962 1959 if ( !isset( $q['taxonomy'] ) ) { … … 2658 2655 $this->queried_object_id = 0; 2659 2656 2660 $tax_query_in = wp_list_filter( $this->tax_query , array( 'operator' => 'IN' ) );2657 $tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) ); 2661 2658 if ( !empty( $tax_query_in ) ) { 2662 2659 $query = reset( $tax_query_in );
Note: See TracChangeset
for help on using the changeset viewer.