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