Changeset 21855
- Timestamp:
- 09/15/2012 07:44:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r21836 r21855 2221 2221 if ( $this->is_tax ) { 2222 2222 if ( empty($post_type) ) { 2223 $post_type = 'any'; 2223 // Do a fully inclusive search for currently registered post types of queried taxonomies 2224 $post_type = array(); 2225 $taxonomies = wp_list_pluck( $this->tax_query->queries, 'taxonomy' ); 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; 2229 } 2230 if ( ! $post_type ) 2231 $post_type = 'any'; 2232 2224 2233 $post_status_join = true; 2225 2234 } elseif ( in_array('attachment', (array) $post_type) ) {
Note: See TracChangeset
for help on using the changeset viewer.