Ticket #21290: 21290-7.diff
File 21290-7.diff, 804 bytes (added by , 12 years ago) |
---|
-
wp-includes/query.php
2224 2224 $post_type = array(); 2225 2225 $taxonomies = wp_list_pluck( $this->tax_query->queries, 'taxonomy' ); 2226 2226 foreach ( get_post_types( array( 'exclude_from_search' => false ) ) as $pt ) { 2227 if ( array_intersect( $taxonomies, get_object_taxonomies( $pt ) ) ) 2228 $post_type[] = $pt; 2227 if ( $pt === 'attachment' ) 2228 if ( array_intersect( $taxonomies, get_taxonomies_for_attachments() ) ) 2229 $post_type[] = $pt; 2230 else 2231 if ( array_intersect( $taxonomies, get_object_taxonomies( $pt ) ) ) 2232 $post_type[] = $pt; 2229 2233 } 2230 2234 if ( ! $post_type ) 2231 2235 $post_type = 'any';