Changeset 10047 for trunk/wp-admin/theme-editor.php
- Timestamp:
- 12/04/2008 09:29:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/theme-editor.php
r9903 r10047 136 136 <?php 137 137 $template_mapping = array(); 138 $template_dir = $themes[$theme]['Template Dir']; 138 139 foreach($themes[$theme]['Template Files'] as $template_file) { 139 140 $description = trim( get_file_description($template_file) ); … … 141 142 $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description"; 142 143 $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc; 143 $template_mapping[ $description ] = array( $template_file, $filedesc ); 144 145 // If we have two files of the same name prefer the one in the Template Directory 146 // This means that we display the correct files for child themes which overload Templates as well as Styles 147 if( array_key_exists($description, $template_mapping ) ) { 148 if ( false !== strpos( $template_file, $template_dir ) ) { 149 $template_mapping[ $description ] = array( $template_file, $filedesc ); 150 } 151 } else { 152 $template_mapping[ $description ] = array( $template_file, $filedesc ); 153 } 144 154 } 145 155 ksort( $template_mapping );
Note: See TracChangeset
for help on using the changeset viewer.