Changeset 16512 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 11/20/2010 09:28:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r16511 r16512 553 553 _transform_terms( $terms, $taxonomies, $field, 'term_id' ); 554 554 555 if ( empty( $terms ) )556 continue;557 558 555 $children = array(); 559 556 foreach ( $terms as $term ) { … … 569 566 } 570 567 571 if ( empty( $terms ) )572 continue;573 574 $terms = implode( ',', $terms );575 576 568 if ( 'IN' == $operator ) { 569 if ( empty( $terms ) ) 570 return array( 'join' => '', 'where' => ' AND 0 = 1'); 571 572 $terms = implode( ',', $terms ); 573 577 574 $alias = $i ? 'tt' . $i : $wpdb->term_relationships; 578 575 … … 586 583 } 587 584 elseif ( 'NOT IN' == $operator ) { 585 if ( empty( $terms ) ) 586 continue; 587 588 $terms = implode( ',', $terms ); 589 588 590 $where .= " AND $primary_table.$primary_id_column NOT IN ( 589 591 SELECT object_id … … 599 601 function _transform_terms( &$terms, $taxonomies, $field, $resulting_field ) { 600 602 global $wpdb; 603 604 if ( empty( $terms ) ) 605 return; 601 606 602 607 if ( $field == $resulting_field )
Note: See TracChangeset
for help on using the changeset viewer.