diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 9fe57bd7e8..5c01e7a5d5 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -902,11 +902,15 @@ $wp_file_descriptions = function get_file_description($file) { global $wp_file_descriptions; - if (isset($wp_file_descriptions[$file])) { - return $wp_file_descriptions[$file]; + if ( isset($wp_file_descriptions[basename($file)] ) ) { + return $wp_file_descriptions[basename($file)]; + } else { + $template_data = implode('', file(ABSPATH . $file)); + if ( preg_match("|Template Name:(.*)|i", $template_data, $name) ) + return $name[1]; } - return $file; + return basename( $file ); } function update_recently_edited($file) { diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index f65d91af17..d89376d852 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -100,9 +100,9 @@ default: