From f26a84a75279a96a61097ff93445db4f90c45f11 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 14 Nov 2005 10:26:39 +0000 Subject: [PATCH] No need to display the whole big path, fixes #1617 git-svn-id: https://develop.svn.wordpress.org/trunk@3084 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/theme-editor.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 74fb83b172..ee0524c7cd 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -41,6 +41,8 @@ if (empty($file)) { $file = validate_file_to_edit($file, $allowed_files); $real_file = get_real_file_to_edit($file); +$file_show = basename( $file ); + switch($action) { case 'update': @@ -104,10 +106,10 @@ default:
' . sprintf(__('Editing %s'), $file) . ''; + if ( is_writeable($real_file) ) { + echo '

' . sprintf(__('Editing %s'), $file_show) . '

'; } else { - echo '

' . sprintf(__('Browsing %s'), $file) . '

'; + echo '

' . sprintf(__('Browsing %s'), $file_show) . '

'; } ?>