Ticket #8236: theme-editor.diff
File theme-editor.diff, 1.4 KB (added by , 17 years ago) |
---|
-
theme-editor.php
134 134 <ul> 135 135 <?php 136 136 $template_mapping = array(); 137 $template_dir = $themes[$theme]['Template Dir']; //Or would it be better to use 'Stylesheet Dir' 137 138 foreach($themes[$theme]['Template Files'] as $template_file) { 138 139 $description = trim( get_file_description($template_file) ); 139 140 $template_show = basename($template_file); 140 141 $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description"; 141 142 $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc; 142 $template_mapping[ $description ] = array( $template_file, $filedesc ); 143 144 if( array_key_exists($description, $template_mapping) ){ //If it already exists in the array 145 $pos = strpos($template_file, $template_dir); 146 //If the 'Template Dir' was found in the $template_file 147 if( $pos !== false ) $template_mapping[ $description ] = array( $template_file, $filedesc ); 148 }else $template_mapping[ $description ] = array( $template_file, $filedesc ); 149 143 150 } 144 151 ksort( $template_mapping ); 145 152 while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) :