Changeset 12253 for trunk/wp-admin/includes/theme.php
- Timestamp:
- 11/21/2009 10:05:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme.php
r12225 r12253 128 128 $theme = get_current_theme(); 129 129 $templates = $themes[$theme]['Template Files']; 130 $page_templates = array 130 $page_templates = array(); 131 131 132 132 if ( is_array( $templates ) ) { 133 $base = array( trailingslashit(get_template_directory()), trailingslashit(get_stylesheet_directory()) ); 134 133 135 foreach ( $templates as $template ) { 136 $basename = str_replace($base, '', $template); 137 138 // don't allow template files in subdirectories 139 if ( false !== strpos($basename, '/') ) 140 continue; 141 134 142 $template_data = implode( '', file( $template )); 135 143 … … 139 147 140 148 if ( !empty( $name ) ) { 141 $page_templates[trim( $name )] = basename( $template );;149 $page_templates[trim( $name )] = $basename; 142 150 } 143 151 }
Note: See TracChangeset
for help on using the changeset viewer.