Ticket #52314: 52314-5.diff
File 52314-5.diff, 1.2 KB (added by , 20 months ago) |
---|
-
src/wp-admin/admin-header.php
22 22 * @global string $update_title 23 23 * @global int $total_update_count 24 24 * @global string $parent_file 25 * @global string $typenow 25 26 */ 26 27 global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, 27 $update_title, $total_update_count, $parent_file ;28 $update_title, $total_update_count, $parent_file, $typenow; 28 29 29 30 // Catch plugins that include admin-header.php before admin.php completes. 30 31 if ( empty( $current_screen ) ) { … … 57 58 $admin_title = sprintf( __( 'Recovery Mode — %s' ), $admin_title ); 58 59 } 59 60 61 if ( 'post' === $current_screen->base && 'add' !== $current_screen->action ) { 62 $post_title = get_the_title(); 63 if ( ! empty( $post_title ) ) { 64 $obj = get_post_type_object( $typenow ); 65 /* translators: Editor admin screen title. 1: "Edit item" text for the post type, 2: Post title. */ 66 $admin_title = sprintf( __( '%1$s “%2$s”' ), $obj->labels->edit_item, $post_title ); 67 } 68 } 69 60 70 /** 61 71 * Filters the title tag content for an admin page. 62 72 *