Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-includes/class-wp-theme.php

    r21050 r21120  
    931931
    932932            foreach ( $files as $file => $full_path ) {
    933                 $headers = get_file_data( $full_path, array( 'Template Name' => 'Template Name' ) );
    934                 if ( empty( $headers['Template Name'] ) )
     933                if ( ! preg_match( '|Template Name:(.*)$|mi', file_get_contents( $full_path ), $header ) )
    935934                    continue;
    936                 $page_templates[ $file ] = $headers['Template Name'];
     935                $page_templates[ $file ] = _cleanup_header_comment( $header[1] );
    937936            }
    938937
Note: See TracChangeset for help on using the changeset viewer.