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:
parent
cfe57e77ad
commit
140f5e22b1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user