wp/wp-admin/theme-editor.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-admin/theme-editor.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-admin/theme-editor.php	Fri Sep 05 18:52:52 2025 +0200
@@ -182,12 +182,7 @@
 	$content = esc_textarea( $content );
 }
 
-$file_description = get_file_description( $relative_file );
-$file_show        = array_search( $file, array_filter( $allowed_files ), true );
-$description      = esc_html( $file_description );
-if ( $file_description !== $file_show ) {
-	$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
-}
+$file_show = array_search( $file, array_filter( $allowed_files ), true );
 ?>
 <div class="wrap">
 <h1><?php echo esc_html( $title ); ?></h1>
@@ -235,12 +230,22 @@
 <div class="alignleft">
 <h2>
 	<?php
-	echo $theme->display( 'Name' );
-	if ( $description ) {
-		echo ': ' . $description;
+	if ( wp_get_theme()->get( 'Name' ) === $theme->display( 'Name' ) ) {
+		/* translators: %s: Theme name. */
+		printf( __( 'Editing %s (active)' ), '<strong>' . $theme->display( 'Name' ) . '</strong>' );
+	} else {
+		/* translators: %s: Theme name. */
+		printf( __( 'Editing %s (inactive)' ), '<strong>' . $theme->display( 'Name' ) . '</strong>' );
 	}
 	?>
 </h2>
+<?php
+printf(
+	/* translators: %s: File path. */
+	' <span><strong>' . __( 'File: %s' ) . '</strong></span>',
+	esc_html( $file_show )
+);
+?>
 </div>
 <div class="alignright">
 	<form action="theme-editor.php" method="get">