Make WordPress Core


Ignore:
Timestamp:
06/20/2014 04:20:35 PM (11 years ago)
Author:
wonderboymusic
Message:

Revert [28613] and [28664]. A good idea, but too much BC baggage.

See #28099.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r28737 r28783  
    18311831                'include_children' => false
    18321832            );
    1833         } elseif ( isset( $this->query['category__in'] ) ) {
    1834             $q['category__in'] = false;
    18351833        }
    18361834
     
    18901888                'terms' => $q['tag__in']
    18911889            );
    1892         } elseif ( isset( $this->query['tag__in'] ) ) {
    1893             $q['tag__in'] = false;
    18941890        }
    18951891
     
    19191915                'field' => 'slug'
    19201916            );
    1921         } elseif ( isset( $this->query['tag_slug__in'] ) ) {
    1922             $q['tag_slug__in'] = false;
    19231917        }
    19241918
     
    24542448            $post__in = implode(',', array_map( 'absint', $q['post__in'] ));
    24552449            $where .= " AND {$wpdb->posts}.ID IN ($post__in)";
    2456         } elseif ( isset( $this->query['post__in'] ) ) {
    2457             $post__in = 0;
    2458             $where .= " AND 1=0 ";
    24592450        } elseif ( $q['post__not_in'] ) {
    24602451            $post__not_in = implode(',',  array_map( 'absint', $q['post__not_in'] ));
     
    24672458            $post_parent__in = implode( ',', array_map( 'absint', $q['post_parent__in'] ) );
    24682459            $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 ";
    24722460        } elseif ( $q['post_parent__not_in'] ) {
    24732461            $post_parent__not_in = implode( ',',  array_map( 'absint', $q['post_parent__not_in'] ) );
     
    25072495            $join .= $clauses['join'];
    25082496            $where .= $clauses['where'];
    2509         }
    2510 
    2511         // If *__in is passed to WP_Query as an empty array, don't return results
    2512         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             }
    25162497        }
    25172498
     
    26072588            $author__in = implode( ',', array_map( 'absint', array_unique( (array) $q['author__in'] ) ) );
    26082589            $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 ';
    26122590        }
    26132591
Note: See TracChangeset for help on using the changeset viewer.