Changeset 28783 for trunk/src/wp-includes/query.php
- Timestamp:
- 06/20/2014 04:20:35 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r28737 r28783 1831 1831 'include_children' => false 1832 1832 ); 1833 } elseif ( isset( $this->query['category__in'] ) ) {1834 $q['category__in'] = false;1835 1833 } 1836 1834 … … 1890 1888 'terms' => $q['tag__in'] 1891 1889 ); 1892 } elseif ( isset( $this->query['tag__in'] ) ) {1893 $q['tag__in'] = false;1894 1890 } 1895 1891 … … 1919 1915 'field' => 'slug' 1920 1916 ); 1921 } elseif ( isset( $this->query['tag_slug__in'] ) ) {1922 $q['tag_slug__in'] = false;1923 1917 } 1924 1918 … … 2454 2448 $post__in = implode(',', array_map( 'absint', $q['post__in'] )); 2455 2449 $where .= " AND {$wpdb->posts}.ID IN ($post__in)"; 2456 } elseif ( isset( $this->query['post__in'] ) ) {2457 $post__in = 0;2458 $where .= " AND 1=0 ";2459 2450 } elseif ( $q['post__not_in'] ) { 2460 2451 $post__not_in = implode(',', array_map( 'absint', $q['post__not_in'] )); … … 2467 2458 $post_parent__in = implode( ',', array_map( 'absint', $q['post_parent__in'] ) ); 2468 2459 $where .= " AND {$wpdb->posts}.post_parent IN ($post_parent__in)"; 2469 } elseif ( isset( $this->query['post_parent__in'] ) ) {2470 $post_parent__in = 0;2471 $where .= " AND 1=0 ";2472 2460 } elseif ( $q['post_parent__not_in'] ) { 2473 2461 $post_parent__not_in = implode( ',', array_map( 'absint', $q['post_parent__not_in'] ) ); … … 2507 2495 $join .= $clauses['join']; 2508 2496 $where .= $clauses['where']; 2509 }2510 2511 // If *__in is passed to WP_Query as an empty array, don't return results2512 foreach ( array( 'category', 'tag', 'tag_slug' ) as $in ) {2513 if ( isset( $q["{$in}__in"] ) && false === $q["{$in}__in"] ) {2514 $where = " AND 1=0 $where";2515 }2516 2497 } 2517 2498 … … 2607 2588 $author__in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__in'] ) ) ); 2608 2589 $where .= " AND {$wpdb->posts}.post_author IN ($author__in) "; 2609 } elseif ( isset( $this->query['author__in'] ) ) {2610 $author__in = 0;2611 $where .= ' AND 1=0 ';2612 2590 } 2613 2591
Note: See TracChangeset
for help on using the changeset viewer.