Ticket #16152: 16152.2.patch
File 16152.2.patch, 984 bytes (added by , 14 years ago) |
---|
-
wp-includes/query.php
1684 1684 $cat = abs($cat); 1685 1685 if ( $in ) { 1686 1686 $q['category__in'][] = $cat; 1687 $q['category__in'] = array_merge( $q['category__in'], get_term_children($cat, 'category') ); 1687 1688 } else { 1688 1689 $q['category__not_in'][] = $cat; 1690 $q['category__not_in'] = array_merge( $q['category__not_in'], get_term_children($cat, 'category') ); 1689 1691 } 1690 1692 } 1691 1693 $q['cat'] = implode(',', $req_cats); … … 1696 1698 $tax_query[] = array( 1697 1699 'taxonomy' => 'category', 1698 1700 'terms' => $q['category__in'], 1699 'field' => 'term_id' 1701 'field' => 'term_id', 1702 'include_children' => false 1700 1703 ); 1701 1704 } 1702 1705 … … 1706 1709 'taxonomy' => 'category', 1707 1710 'terms' => $q['category__not_in'], 1708 1711 'operator' => 'NOT IN', 1712 'include_children' => false 1709 1713 ); 1710 1714 } 1711 1715