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:
parent
e693c815d3
commit
007eb334c5
@ -855,17 +855,11 @@ function get_real_file_to_edit($file) {
|
|||||||
$wp_file_descriptions =
|
$wp_file_descriptions =
|
||||||
array(
|
array(
|
||||||
'index.php' => __('Main Template'),
|
'index.php' => __('Main Template'),
|
||||||
'wp-layout.css' => __('Stylesheet'),
|
|
||||||
'style.css' => __('Stylesheet'),
|
'style.css' => __('Stylesheet'),
|
||||||
'wp-comments.php' => __('Comments Template'),
|
|
||||||
'comments.php' => __('Comments Template'),
|
'comments.php' => __('Comments Template'),
|
||||||
'wp-comments-popup.php' => __('Popup Comments Template'),
|
|
||||||
'comments-popup.php' => __('Popup Comments Template'),
|
'comments-popup.php' => __('Popup Comments Template'),
|
||||||
'wp-footer.php' => __('Footer Template'),
|
|
||||||
'footer.php' => __('Footer Template'),
|
'footer.php' => __('Footer Template'),
|
||||||
'wp-header.php' => __('Header Template'),
|
|
||||||
'header.php' => __('Header Template'),
|
'header.php' => __('Header Template'),
|
||||||
'wp-sidebar.php' => __('Sidebar Template'),
|
|
||||||
'sidebar.php' => __('Sidebar Template'),
|
'sidebar.php' => __('Sidebar Template'),
|
||||||
'archive.php' => __('Archive Template'),
|
'archive.php' => __('Archive Template'),
|
||||||
'category.php' => __('Category Template'),
|
'category.php' => __('Category Template'),
|
||||||
@ -874,7 +868,11 @@ $wp_file_descriptions =
|
|||||||
'single.php' => __('Post Template'),
|
'single.php' => __('Post Template'),
|
||||||
'404.php' => __('404 Template'),
|
'404.php' => __('404 Template'),
|
||||||
'my-hacks.php' => __('my-hacks.php (legacy hacks support)'),
|
'my-hacks.php' => __('my-hacks.php (legacy hacks support)'),
|
||||||
'.htaccess' => __('.htaccess (for rewrite rules)')
|
'.htaccess' => __('.htaccess (for rewrite rules)'),
|
||||||
|
// Deprecated files
|
||||||
|
'wp-layout.css' => __('Stylesheet'),
|
||||||
|
'wp-comments.php' => __('Comments Template'),
|
||||||
|
'wp-comments-popup.php' => __('Popup Comments Template')
|
||||||
);
|
);
|
||||||
|
|
||||||
function get_file_description($file) {
|
function get_file_description($file) {
|
||||||
|
@ -100,7 +100,12 @@ echo '</ol>';
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<h3><?php _e('Common'); ?></h3>
|
<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>
|
<ul>
|
||||||
<?php foreach ($common_files as $common_file) : ?>
|
<?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>
|
<li><a href="templates.php?file=<?php echo $common_file?>"><?php echo get_file_description($common_file); ?></a></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user