Users: Display the name of user being edited on Edit User screen.

Props seanchayes.
Fixes #28182.

git-svn-id: https://develop.svn.wordpress.org/trunk@39907 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2017-01-15 07:13:11 +00:00
parent 40f076d756
commit fa174e4a06
1 changed files with 8 additions and 1 deletions

View File

@ -25,7 +25,13 @@ elseif ( ! get_userdata( $user_id ) )
wp_enqueue_script('user-profile'); wp_enqueue_script('user-profile');
$title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User'); if ( IS_PROFILE_PAGE ) {
$title = __( 'Profile' );
} else {
/* translators: %s: user's display name */
$title = __( 'Edit User %s' );
}
if ( current_user_can('edit_users') && !IS_PROFILE_PAGE ) if ( current_user_can('edit_users') && !IS_PROFILE_PAGE )
$submenu_file = 'users.php'; $submenu_file = 'users.php';
else else
@ -166,6 +172,7 @@ $profileuser = get_user_to_edit($user_id);
if ( !current_user_can('edit_user', $user_id) ) if ( !current_user_can('edit_user', $user_id) )
wp_die(__('Sorry, you are not allowed to edit this user.')); wp_die(__('Sorry, you are not allowed to edit this user.'));
$title = sprintf( $title, $profileuser->display_name );
$sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); $sessions = WP_Session_Tokens::get_instance( $profileuser->ID );
include(ABSPATH . 'wp-admin/admin-header.php'); include(ABSPATH . 'wp-admin/admin-header.php');