Ticket #21290: 21290-3.diff
File 21290-3.diff, 801 bytes (added by , 12 years ago) |
---|
-
wp-includes/query.php
2216 2216 if ( $this->is_tax ) { 2217 2217 if ( empty($post_type) ) { 2218 2218 $post_type = 'any'; 2219 2220 // do a fully inclusive search for registered post types of queried taxonomies 2221 $tax_post_types = array(); 2222 foreach ( wp_list_pluck( $this->tax_query->queries, 'taxonomy' ) as $tax ) { 2223 $tax_post_types = array_merge($tax_post_types, get_taxonomy($tax)->object_type); 2224 } 2225 if ( !empty($tax_post_types) ) { 2226 $post_type = array_unique($tax_post_types); 2227 } 2228 2219 2229 $post_status_join = true; 2220 2230 } elseif ( in_array('attachment', (array) $post_type) ) { 2221 2231 $post_status_join = true;