Ticket #15256: 15256.diff
File 15256.diff, 834 bytes (added by , 13 years ago) |
---|
-
wp-includes/query.php
1730 1730 $in = ($cat > 0); 1731 1731 $cat = abs($cat); 1732 1732 if ( $in ) { 1733 $q['category__in'][] = $cat; 1734 $q['category__in'] = array_merge( $q['category__in'], get_term_children($cat, 'category') ); 1733 $q['category__in'][] = $cat; // children are included by default in get_tax_sql() 1735 1734 } else { 1736 1735 $q['category__not_in'][] = $cat; 1737 1736 $q['category__not_in'] = array_merge( $q['category__not_in'], get_term_children($cat, 'category') ); … … 1746 1745 'taxonomy' => 'category', 1747 1746 'terms' => $q['category__in'], 1748 1747 'field' => 'term_id', 1749 'include_children' => false1750 1748 ); 1751 1749 } 1752 1750