diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 3779de43e3..b7300b71a2 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -125,7 +125,7 @@ default: (%s)" : "%s"; +$desc_header = ( $description != $file_show ) ? "$description ($file_show)" : $file_show; $is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet']; ?> @@ -135,12 +135,7 @@ $is_child_theme = $themes[$theme]['Template'] != $themes[$theme]['Stylesheet'];
-

+

@@ -182,16 +177,7 @@ if ($allowed_files) : $template_show = basename($template_file); $filedesc = ( $description != $template_file ) ? "$description
($template_show)" : "$description"; $filedesc = ( $template_file == $file ) ? "$description
($template_show)
" : $filedesc; - - // If we have two files of the same name prefer the one in the Template Directory - // This means that we display the correct files for child themes which overload Templates as well as Styles - if ( array_key_exists($description, $template_mapping ) ) { - if ( false !== strpos( $template_file, $template_dir ) ) { - $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); - } - } else { - $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); - } + $template_mapping[ $description ] = array( _get_template_edit_filename($template_file, $template_dir), $filedesc ); } ksort( $template_mapping ); while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) :