| | 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( array( 'exclude_from_search' => false ) ) 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 | |