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

git-svn-id: http://svn.automattic.com/wordpress/trunk@2005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-12-27 03:27:17 +00:00
parent 880b1b2495
commit 210016e4d4

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