Changeset 22109 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 10/04/2012 01:16:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r21996 r22109 661 661 $where = array(); 662 662 $i = 0; 663 664 foreach ( $this->queries as $query ) { 663 $count = count( $this->queries ); 664 665 foreach ( $this->queries as $index => $query ) { 665 666 $this->clean_query( $query ); 666 667 667 if ( is_wp_error( $query ) ) {668 if ( is_wp_error( $query ) ) 668 669 return self::$no_results; 669 }670 670 671 671 extract( $query ); … … 674 674 675 675 if ( empty( $terms ) ) { 676 if ( 'OR' == $this->relation ) 676 if ( 'OR' == $this->relation ) { 677 if ( ( $index + 1 === $count ) && empty( $where ) ) 678 return self::$no_results; 677 679 continue; 678 else680 } else { 679 681 return self::$no_results; 682 } 680 683 } 681 684 … … 721 724 } 722 725 723 if ( ! empty( $where ) )726 if ( ! empty( $where ) ) 724 727 $where = ' AND ( ' . implode( " $this->relation ", $where ) . ' )'; 725 728 else
Note: See TracChangeset
for help on using the changeset viewer.