Changeset 17246
- Timestamp:
- 01/09/2011 08:49:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r17245 r17246 1230 1230 */ 1231 1231 var $is_post_type_archive = false; 1232 1233 /** 1234 * Whether the tax query has been parsed once. 1235 * 1236 * @since 3.1.0 1237 * @access private 1238 * @var bool 1239 */ 1240 var $parsed_tax_query = false; 1232 1241 1233 1242 /** … … 1486 1495 } 1487 1496 1497 $this->parsed_tax_query = false; 1488 1498 $this->parse_tax_query( $qv ); 1489 1499 … … 1672 1682 1673 1683 // Category stuff 1674 if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular ) {1684 if ( !empty($q['cat']) && '0' != $q['cat'] && !$this->is_singular && !$this->parsed_tax_query ) { 1675 1685 $q['cat'] = ''.urldecode($q['cat']).''; 1676 1686 $q['cat'] = addslashes_gpc($q['cat']); … … 1685 1695 if ( $in ) { 1686 1696 $q['category__in'][] = $cat; 1697 $q['category__in'] = array_merge( $q['category__in'], get_term_children($cat, 'category') ); 1687 1698 } else { 1688 1699 $q['category__not_in'][] = $cat; 1700 $q['category__not_in'] = array_merge( $q['category__not_in'], get_term_children($cat, 'category') ); 1689 1701 } 1690 1702 } … … 1697 1709 'taxonomy' => 'category', 1698 1710 'terms' => $q['category__in'], 1699 'field' => 'term_id' 1711 'field' => 'term_id', 1712 'include_children' => false 1700 1713 ); 1701 1714 } … … 1706 1719 'taxonomy' => 'category', 1707 1720 'terms' => $q['category__not_in'], 1708 'operator' => 'NOT IN' 1721 'operator' => 'NOT IN', 1722 'include_children' => false 1709 1723 ); 1710 1724 } … … 1716 1730 'terms' => $q['category__and'], 1717 1731 'field' => 'term_id', 1718 'operator' => 'AND' 1732 'operator' => 'AND', 1733 'include_children' => false 1719 1734 ); 1720 1735 } … … 1773 1788 ); 1774 1789 } 1790 1791 $this->parsed_tax_query = true; 1775 1792 1776 1793 $this->tax_query = new WP_Tax_Query( $tax_query );
Note: See TracChangeset
for help on using the changeset viewer.