Load the most recent file into the template editor by default.

git-svn-id: https://develop.svn.wordpress.org/trunk@2005 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-12-27 03:27:17 +00:00
parent cfe57e77ad
commit 140f5e22b1
1 changed files with 8 additions and 2 deletions

View File

@ -19,8 +19,14 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
}
}
$recents = get_option('recently_edited');
if (empty($file)) {
$file = 'index.php';
if ($recents) {
$file = $recents[0];
} else {
$file = 'index.php';
}
}
$file = validate_file_to_edit($file);
@ -82,7 +88,7 @@ if (is_writeable($real_file)) {
?>
<div id="templateside">
<?php
if ( $recents = get_option('recently_edited') ) :
if ( $recents ) :
?>
<h3><?php _e('Recent'); ?></h3>
<?php