diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php
index e9bee83010..30e408e17f 100644
--- a/wp-admin/theme-editor.php
+++ b/wp-admin/theme-editor.php
@@ -132,25 +132,37 @@ if ($allowed_files) :
?>
-($template_show)" : "$description";
$filedesc = ( $template_file == $file ) ? "$description ($template_show)" : $filedesc;
- ?>
+ $template_mapping[ $description ] = array( $template_file, $filedesc );
+ }
+ ksort( $template_mapping );
+ while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) :
+ ?>
- &theme=">
-
+
-($style_show)" : "$description";
$filedesc = ( $style_file == $file ) ? "$description ($style_show)" : $filedesc;
+ $template_mapping[ $description ] = array( $style_file, $filedesc );
+ }
+ ksort( $template_mapping );
+ while ( list( $template_sorted_key, list( $style_file, $filedesc ) ) = each( $template_mapping ) ) :
?>
- &theme=">
-
+