Changeset 8717
- Timestamp:
- 08/23/2008 09:28:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/theme-editor.php
r8656 r8717 133 133 <h4><?php _e('Templates'); ?></h4> 134 134 <ul> 135 <?php foreach($themes[$theme]['Template Files'] as $template_file) : 136 $description = get_file_description($template_file); 135 <?php 136 $template_mapping = array(); 137 foreach($themes[$theme]['Template Files'] as $template_file) { 138 $description = trim( get_file_description($template_file) ); 137 139 $template_show = basename($template_file); 138 140 $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description"; 139 141 $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc; 140 ?> 142 $template_mapping[ $description ] = array( $template_file, $filedesc ); 143 } 144 ksort( $template_mapping ); 145 while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) : 146 ?> 141 147 <li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li> 142 <?php end foreach; ?>148 <?php endwhile; ?> 143 149 </ul> 144 150 <h4><?php echo _c('Styles|Theme stylesheets in theme editor'); ?></h4> 145 151 <ul> 146 <?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) : 147 $description = get_file_description($style_file); 152 <?php 153 $template_mapping = array(); 154 foreach($themes[$theme]['Stylesheet Files'] as $style_file) { 155 $description = trim( get_file_description($style_file) ); 148 156 $style_show = basename($style_file); 149 157 $filedesc = ( $description != $style_file ) ? "$description <span class='nonessential'>($style_show)</span>" : "$description"; 150 158 $filedesc = ( $style_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($style_show)</span></span>" : $filedesc; 159 $template_mapping[ $description ] = array( $style_file, $filedesc ); 160 } 161 ksort( $template_mapping ); 162 while ( list( $template_sorted_key, list( $style_file, $filedesc ) ) = each( $template_mapping ) ) : 151 163 ?> 152 164 <li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li> 153 <?php end foreach; ?>165 <?php endwhile; ?> 154 166 </ul> 155 167 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.