Changeset 59884 for trunk/src/wp-admin/plugin-editor.php
- Timestamp:
- 02/27/2025 11:02:47 PM (10 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/plugin-editor.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugin-editor.php
r57854 r59884 85 85 $file = validate_file_to_edit( $file, $plugin_files ); 86 86 $real_file = WP_PLUGIN_DIR . '/' . $file; 87 88 $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_files[0] ); 89 $plugin_name = $plugin_data['Name']; 87 90 88 91 // Handle fallback editing of file when JavaScript is not available. … … 221 224 if ( is_plugin_active( $plugin ) ) { 222 225 if ( is_writable( $real_file ) ) { 223 /* translators: %s: Plugin filename. */224 printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $ file ) . '</strong>' );226 /* translators: %s: Plugin name. */ 227 printf( __( 'Editing %s (active)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' ); 225 228 } else { 226 /* translators: %s: Plugin filename. */227 printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $ file ) . '</strong>' );229 /* translators: %s: Plugin name. */ 230 printf( __( 'Browsing %s (active)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' ); 228 231 } 229 232 } else { 230 233 if ( is_writable( $real_file ) ) { 231 /* translators: %s: Plugin filename. */232 printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $ file ) . '</strong>' );234 /* translators: %s: Plugin name. */ 235 printf( __( 'Editing %s (inactive)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' ); 233 236 } else { 234 /* translators: %s: Plugin filename. */235 printf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $ file ) . '</strong>' );237 /* translators: %s: Plugin name. */ 238 printf( __( 'Browsing %s (inactive)' ), '<strong>' . esc_html( $plugin_name ) . '</strong>' ); 236 239 } 237 240 } 238 241 ?> 239 242 </h2> 243 <?php 244 printf( 245 /* translators: %s: File path. */ 246 ' <span><strong>' . __( 'File: %s' ) . '</strong></span>', 247 esc_html( $file ) 248 ); 249 ?> 240 250 </div> 241 251 <div class="alignright">
Note: See TracChangeset
for help on using the changeset viewer.