WordPress.org

Make WordPress Core

Ticket #19939: is-pta-patch.diff

File is-pta-patch.diff, 583 bytes (added by wonderboymusic, 6 years ago)
  • wp-includes/query.php

     
    30233023                if ( empty( $post_types ) || !$this->is_post_type_archive )
    30243024                        return (bool) $this->is_post_type_archive;
    30253025
    3026                 $post_type_object = $this->get_queried_object();
    3027 
    3028                 return in_array( $post_type_object->name, (array) $post_types );
     3026                $queried_post_types = (array) get_query_var( 'post_type' );
     3027                return array_intersect( (array) $post_types, $queried_post_types );
    30293028        }
    30303029
    30313030        /**