Ticket #21290: 21290-2.diff
File 21290-2.diff, 775 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 $tax_post_types = array(); 2220 foreach ( get_taxonomies() as $taxonomy ) { 2221 if ( isset($this->query_vars[$taxonomy]) ) { 2222 $tax_obj = get_taxonomy($taxonomy); 2223 $tax_post_types = array_unique( array_merge($tax_post_types, $tax_obj->object_type) ); 2224 } 2225 } 2226 if ( !empty($tax_post_types) ) { 2227 $post_type = $tax_post_types; 2228 } 2219 2229 $post_status_join = true; 2220 2230 } elseif ( in_array('attachment', (array) $post_type) ) { 2221 2231 $post_status_join = true;