Changeset 28422 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 05/15/2014 05:40:40 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r28421 r28422 739 739 $this->clean_query( $query ); 740 740 741 if ( is_wp_error( $query ) ) 741 if ( is_wp_error( $query ) ) { 742 742 return self::$no_results; 743 744 extract( $query ); 743 } 744 745 $terms = $query['terms']; 746 $operator = $query['operator']; 745 747 746 748 if ( 'IN' == $operator ) { … … 748 750 if ( empty( $terms ) ) { 749 751 if ( 'OR' == $this->relation ) { 750 if ( ( $index + 1 === $count ) && empty( $where ) ) 752 if ( ( $index + 1 === $count ) && empty( $where ) ) { 751 753 return self::$no_results; 754 } 752 755 continue; 753 756 } else { … … 767 770 } elseif ( 'NOT IN' == $operator ) { 768 771 769 if ( empty( $terms ) ) 772 if ( empty( $terms ) ) { 770 773 continue; 774 } 771 775 772 776 $terms = implode( ',', $terms ); … … 779 783 } elseif ( 'AND' == $operator ) { 780 784 781 if ( empty( $terms ) ) 785 if ( empty( $terms ) ) { 782 786 continue; 787 } 783 788 784 789 $num_terms = count( $terms ); … … 797 802 } 798 803 799 if ( ! empty( $where ) ) 804 if ( ! empty( $where ) ) { 800 805 $where = ' AND ( ' . implode( " $this->relation ", $where ) . ' )'; 801 else806 } else { 802 807 $where = ''; 803 808 } 804 809 return compact( 'join', 'where' ); 805 810 }
Note: See TracChangeset
for help on using the changeset viewer.