Changeset 25238
- Timestamp:
- 09/04/2013 06:16:31 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r25139 r25238 1763 1763 } 1764 1764 1765 if ( !empty($q['category__in']) ) { 1766 $q['category__in'] = array_map('absint', array_unique( (array) $q['category__in'] ) ); 1765 if ( ! empty( $q['category__and'] ) && 1 === count( (array) $q['category__and'] ) ) { 1766 $q['category__and'] = (array) $q['category__and']; 1767 if ( ! isset( $q['category__in'] ) ) 1768 $q['category__in'] = array(); 1769 $q['category__in'][] = absint( reset( $q['category__and'] ) ); 1770 unset( $q['category__and'] ); 1771 } 1772 1773 if ( ! empty( $q['category__in'] ) ) { 1774 $q['category__in'] = array_map( 'absint', array_unique( (array) $q['category__in'] ) ); 1767 1775 $tax_query[] = array( 1768 1776 'taxonomy' => 'category', … … 1773 1781 } 1774 1782 1775 if ( ! empty($q['category__not_in']) ) {1776 $q['category__not_in'] = array_map( 'absint', array_unique( (array) $q['category__not_in'] ) );1783 if ( ! empty($q['category__not_in']) ) { 1784 $q['category__not_in'] = array_map( 'absint', array_unique( (array) $q['category__not_in'] ) ); 1777 1785 $tax_query[] = array( 1778 1786 'taxonomy' => 'category', … … 1783 1791 } 1784 1792 1785 if ( ! empty($q['category__and']) ) {1786 $q['category__and'] = array_map( 'absint', array_unique( (array) $q['category__and'] ) );1793 if ( ! empty($q['category__and']) ) { 1794 $q['category__and'] = array_map( 'absint', array_unique( (array) $q['category__and'] ) ); 1787 1795 $tax_query[] = array( 1788 1796 'taxonomy' => 'category',
Note: See TracChangeset
for help on using the changeset viewer.