Make WordPress Core


Ignore:
Timestamp:
02/04/2009 08:32:27 PM (17 years ago)
Author:
ryan
Message:

Obey post_type. Props filosofo. fixes #8872

File:
1 edited

Legend:

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

    r10150 r10503  
    20652065        }
    20662066
    2067         if ( $this->is_attachment ) {
     2067        if ( 'any' == $post_type ) {
     2068            $where .= '';
     2069        } elseif ( $this->is_attachment ) {
    20682070            $where .= " AND $wpdb->posts.post_type = 'attachment'";
    20692071        } elseif ($this->is_page) {
     
    20712073        } elseif ($this->is_single) {
    20722074            $where .= " AND $wpdb->posts.post_type = 'post'";
    2073         } elseif ( 'any' == $post_type ) {
    2074             $where .= '';
    20752075        } else {
    20762076            $where .= " AND $wpdb->posts.post_type = '$post_type'";
Note: See TracChangeset for help on using the changeset viewer.