Ticket #2926: r3979_theme-editor.patch
File r3979_theme-editor.patch, 1.1 KB (added by , 18 years ago) |
---|
-
wp-admin/theme-editor.php
120 120 <?php 121 121 if ($allowed_files) : 122 122 ?> 123 <?php 124 foreach($allowed_files as $allowed_file) : 125 $filename_root = trim(get_file_description($allowed_file)); 126 $filename = $filename_root; 127 $i = 2; 128 while (array_key_exists($filename, $files_tmp)) 129 { 130 $filename = $filename_root . " ($i)"; 131 $i++; 132 } 133 $files_tmp[$filename] = $allowed_file; 134 endforeach; 135 if ($files_tmp) : 136 ksort($files_tmp); 137 $allowed_files = $files_tmp; 138 endif; 139 ?> 123 140 <ul> 124 <?php foreach($allowed_files as $ allowed_file) : ?>125 <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo get_file_description($allowed_file); ?></a></li>141 <?php foreach($allowed_files as $file_name => $allowed_file) : ?> 142 <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&theme=<?php echo urlencode($theme) ?>"><?php echo $file_name; ?></a></li> 126 143 <?php endforeach; ?> 127 144 </ul> 128 145 <?php endif; ?>