Changeset 16380
- Timestamp:
- 11/15/2010 10:11:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16360 r16380 1462 1462 1463 1463 /* 1464 * P opulates the 'tax_query' property1464 * Parses various taxonomy related query vars and sets the appropriate query flags 1465 1465 * 1466 1466 * @access protected … … 1468 1468 * 1469 1469 * @param array &$q The query variables 1470 * @return array tax query 1470 1471 */ 1471 1472 function parse_tax_query( &$q ) { … … 1581 1582 } 1582 1583 1583 $q['tax_query'] = $tax_query; 1584 1585 foreach ( $q['tax_query'] as $query ) { 1584 foreach ( $tax_query as $query ) { 1586 1585 if ( 'IN' == $query['operator'] ) { 1587 1586 switch ( $query['taxonomy'] ) { … … 1597 1596 } 1598 1597 } 1598 1599 return $tax_query; 1599 1600 } 1600 1601 … … 1931 1932 1932 1933 // Taxonomies 1934 $q['tax_query'] = $this->parse_tax_query( $q ); 1933 1935 if ( !empty( $q['tax_query'] ) ) { 1934 1936 if ( empty($post_type) ) { … … 1942 1944 1943 1945 // Back-compat 1944 $cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category' ) );1946 $cat_query = wp_list_filter( $q['tax_query'], array( 'taxonomy' => 'category', 'operator' => 'IN' ) ); 1945 1947 if ( !empty( $cat_query ) ) { 1946 1948 $cat_query = reset( $cat_query );
Note: See TracChangeset
for help on using the changeset viewer.