WordPress.org

Make WordPress Core

Ticket #38766: 38766.diff

File 38766.diff, 579 bytes (added by peterwilsoncc, 4 years ago)
  • src/wp-includes/class-wp-theme.php

    diff --git src/wp-includes/class-wp-theme.php src/wp-includes/class-wp-theme.php
    index 8b3661a..0053fe9 100644
    final class WP_Theme implements ArrayAccess { 
    10331033                                }
    10341034
    10351035                                $types = array( 'page' );
    1036                                 if ( preg_match( '|Template Post Type:(.*)$|mi', file_get_contents( $full_path ), $type ) ) {
     1036                                if ( preg_match( '|Template Post Type:(.*)\.?\s*$|miU', file_get_contents( $full_path ), $type ) ) {
    10371037                                        $types = explode( ',', _cleanup_header_comment( $type[1] ) );
    10381038                                }
    10391039