diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index 73017cae91153..53e46ba394d3b 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -85,6 +85,9 @@ $file = validate_file_to_edit( $file, $plugin_files ); $real_file = WP_PLUGIN_DIR . '/' . $file; +$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_files[0] ); +$plugin_name = $plugin_data['Name']; + // Handle fallback editing of file when JavaScript is not available. $edit_error = null; $posted_content = null; @@ -220,23 +223,30 @@ ' . esc_html( $file ) . '' ); + /* translators: %s: Plugin name. */ + printf( __( 'Editing %s (active)' ), '' . esc_html( $plugin_name ) . '' ); } else { - /* translators: %s: Plugin file name. */ - printf( __( 'Browsing %s (active)' ), '' . esc_html( $file ) . '' ); + /* translators: %s: Plugin name. */ + printf( __( 'Browsing %s (active)' ), '' . esc_html( $plugin_name ) . '' ); } } else { if ( is_writable( $real_file ) ) { - /* translators: %s: Plugin file name. */ - printf( __( 'Editing %s (inactive)' ), '' . esc_html( $file ) . '' ); + /* translators: %s: Plugin name. */ + printf( __( 'Editing %s (inactive)' ), '' . esc_html( $plugin_name ) . '' ); } else { - /* translators: %s: Plugin file name. */ - printf( __( 'Browsing %s (inactive)' ), '' . esc_html( $file ) . '' ); + /* translators: %s: Plugin name. */ + printf( __( 'Browsing %s (inactive)' ), '' . esc_html( $plugin_name ) . '' ); } } ?> +' . __( 'File: %s' ) . '', + esc_html( $file ) +); +?>