Make WordPress Core

Changeset 16505


Ignore:
Timestamp:
11/20/2010 01:39:07 PM (14 years ago)
Author:
scribu
Message:

Don't set post_type to 'any' for category and tag queries. See #12891

File:
1 edited

Legend:

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

    r16495 r16505  
    19511951            $where .= $clauses['where'];
    19521952
    1953             if ( empty($post_type) ) {
    1954                 $post_type = 'any';
    1955                 $post_status_join = true;
    1956             } elseif ( in_array('attachment', (array) $post_type) ) {
    1957                 $post_status_join = true;
     1953debug($this->is_tax, $post_type);
     1954
     1955            if ( $this->is_tax ) {
     1956                if ( empty($post_type) ) {
     1957                    $post_type = 'any';
     1958                    $post_status_join = true;
     1959                } elseif ( in_array('attachment', (array) $post_type) ) {
     1960                    $post_status_join = true;
     1961                }
    19581962            }
    19591963
Note: See TracChangeset for help on using the changeset viewer.