Include legacy template files in the common file list only if they exist.

git-svn-id: https://develop.svn.wordpress.org/trunk@2105 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-01-19 15:23:38 +00:00
parent e693c815d3
commit 007eb334c5
2 changed files with 11 additions and 8 deletions
+6 -1
View File
@@ -100,7 +100,12 @@ echo '</ol>';
endif;
?>
<h3><?php _e('Common'); ?></h3>
<?php $common_files = array('index.php', 'wp-layout.css', 'wp-comments.php', 'wp-comments-popup.php', '.htaccess', 'my-hacks.php'); ?>
<?php $common_files = array('index.php', '.htaccess', 'my-hacks.php');
$old_files = array('wp-layout.css', 'wp-comments.php', 'wp-comments-popup.php');
foreach ($old_files as $old_file) {
if (file_exists(ABSPATH . $old_file))
$common_files[] = $old_file;
} ?>
<ul>
<?php foreach ($common_files as $common_file) : ?>
<li><a href="templates.php?file=<?php echo $common_file?>"><?php echo get_file_description($common_file); ?></a></li>