Ticket #21290: 21290-4.diff
File 21290-4.diff, 895 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 $taxonomies = wp_list_pluck( $this->tax_query->queries, 'taxonomy' ); 2223 foreach ( get_post_types() as $post_type ) { 2224 $post_type_taxonomies = get_object_taxonomies($post_type); 2225 if ( array_intersect($taxonomies, $post_type_taxonomies) ) 2226 $tax_post_types[] = $post_type; 2227 } 2228 if ( $tax_post_types ) 2229 $post_type = $tax_post_types; 2230 2219 2231 $post_status_join = true; 2220 2232 } elseif ( in_array('attachment', (array) $post_type) ) { 2221 2233 $post_status_join = true;