Ticket #11823: taxonomy.php.diff
File taxonomy.php.diff, 1.6 KB (added by , 14 years ago) |
---|
-
taxonomy.php
old new 908 908 $interms = wp_parse_id_list($include); 909 909 foreach ( $interms as $interm ) { 910 910 if ( empty($inclusions) ) 911 $inclusions = ' AND ( t.term_id = ' . intval($interm) . ' ';911 $inclusions = ' AND t.term_id IN ( ' . intval($interm); 912 912 else 913 $inclusions .= ' OR t.term_id = ' . intval($interm) . ' ';913 $inclusions .= ', ' . intval($interm); 914 914 } 915 915 } 916 916 917 917 if ( !empty($inclusions) ) 918 $inclusions .= ' )';918 $inclusions .= ' )'; 919 919 $where .= $inclusions; 920 920 921 921 $exclusions = ''; … … 926 926 $excluded_children[] = $extrunk; 927 927 foreach( $excluded_children as $exterm ) { 928 928 if ( empty($exclusions) ) 929 $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';929 $exclusions = ' AND t.term_id NOT IN ( ' . intval($exterm); 930 930 else 931 $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';931 $exclusions .= ', ' . intval($exterm); 932 932 } 933 933 } 934 934 } … … 937 937 $exterms = wp_parse_id_list($exclude); 938 938 foreach ( $exterms as $exterm ) { 939 939 if ( empty($exclusions) ) 940 $exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';940 $exclusions = ' AND t.term_id NOT IN ( ' . intval($exterm); 941 941 else 942 $exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';942 $exclusions .= ', ' . intval($exterm); 943 943 } 944 944 } 945 945 946 946 if ( !empty($exclusions) ) 947 $exclusions .= ' )';947 $exclusions .= ' )'; 948 948 $exclusions = apply_filters('list_terms_exclusions', $exclusions, $args ); 949 949 $where .= $exclusions; 950 950