WordPress.org

Make WordPress Core

Ticket #49168: 49168.diff

File 49168.diff, 544 bytes (added by maurisrx, 22 months ago)

Patch from https://github.com/WordPress/WordPress/pull/452

  • wp-includes/class-wp-query.php

    diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php
    index 7a96e0160bc..acde7144b48 100644
    a b public function is_post_type_archive( $post_types = '' ) { 
    36123612                }
    36133613                $post_type_object = get_post_type_object( $post_type );
    36143614
    3615                 return in_array( $post_type_object->name, (array) $post_types );
     3615                return in_array( $post_type_object->name, (array) $post_types ) || in_array( $post_type_object->slug, (array) $post_types );
    36163616        }
    36173617
    36183618        /**