From 9a1a22076f1843fb039a2eae996409592b974418 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 19 Nov 2009 19:53:27 +0000 Subject: [PATCH] Revert [12187] as it didn't fix the issue for all cases. See #10959. git-svn-id: http://svn.automattic.com/wordpress/trunk@12225 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 121a4352c..1f7f3adcf 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -121,7 +121,7 @@ function get_broken_themes() { * * @since unknown * - * @return array Key is template name, Value is path within the theme folder + * @return array Key is template name, Value is template name */ function get_page_templates() { $themes = get_themes(); @@ -138,7 +138,7 @@ function get_page_templates() { $name = _cleanup_header_comment($name[1]); if ( !empty( $name ) ) { - $page_templates[trim( $name )] = str_replace(get_template_directory(), '', $template); + $page_templates[trim( $name )] = basename( $template ); ; } } }