Ticket #10605: allow_custom_post_type.10605.diff
| File allow_custom_post_type.10605.diff, 811 bytes (added by , 16 years ago) |
|---|
-
wp-includes/query.php
2072 2072 2073 2073 if ( 'any' == $post_type ) { 2074 2074 $where .= " AND $wpdb->posts.post_type != 'revision'"; 2075 } elseif ( $this->is_attachment ) {2075 } elseif ( empty($post_type) && $this->is_attachment ) { 2076 2076 $where .= " AND $wpdb->posts.post_type = 'attachment'"; 2077 } elseif ( $this->is_page) {2077 } elseif ( empty($post_type) && $this->is_page ) { 2078 2078 $where .= " AND $wpdb->posts.post_type = 'page'"; 2079 } elseif ( $this->is_single) {2079 } elseif ( empty($post_type) && $this->is_single ) { 2080 2080 $where .= " AND $wpdb->posts.post_type = 'post'"; 2081 2081 } else { 2082 2082 $where .= " AND $wpdb->posts.post_type = '$post_type'";