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:
parent
880b1b2495
commit
210016e4d4
|
@ -19,9 +19,15 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$recents = get_option('recently_edited');
|
||||||
|
|
||||||
if (empty($file)) {
|
if (empty($file)) {
|
||||||
|
if ($recents) {
|
||||||
|
$file = $recents[0];
|
||||||
|
} else {
|
||||||
$file = 'index.php';
|
$file = 'index.php';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$file = validate_file_to_edit($file);
|
$file = validate_file_to_edit($file);
|
||||||
$real_file = get_real_file_to_edit($file);
|
$real_file = get_real_file_to_edit($file);
|
||||||
|
@ -82,7 +88,7 @@ if (is_writeable($real_file)) {
|
||||||
?>
|
?>
|
||||||
<div id="templateside">
|
<div id="templateside">
|
||||||
<?php
|
<?php
|
||||||
if ( $recents = get_option('recently_edited') ) :
|
if ( $recents ) :
|
||||||
?>
|
?>
|
||||||
<h3><?php _e('Recent'); ?></h3>
|
<h3><?php _e('Recent'); ?></h3>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue