Changeset 20041
- Timestamp:
- 02/29/2012 08:18:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme.php
r20029 r20041 82 82 */ 83 83 function get_page_templates() { 84 return wp_get_theme()->get_page_templates();84 return array_flip( wp_get_theme()->get_page_templates() ); 85 85 } 86 86 -
trunk/wp-includes/class-wp-theme.php
r20039 r20041 922 922 923 923 foreach ( $files['php'] as $file ) { 924 $headers = get_file_data( $file, array( ' Name' => 'Template Name' ) );925 if ( empty( $headers[' Name'] ) )924 $headers = get_file_data( $file, array( 'Template Name' => 'Template Name' ) ); 925 if ( empty( $headers['Template Name'] ) ) 926 926 continue; 927 $page_templates[ $headers['Name'] ] = basename( $file);927 $page_templates[ basename( $file ) ] = $this->translate_header( 'Template Name', $headers['Template Name'] ); 928 928 } 929 929
Note: See TracChangeset
for help on using the changeset viewer.