diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/user-edit.php --- a/wp/wp-admin/user-edit.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/user-edit.php Tue Dec 15 13:49:49 2020 +0100 @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); +require_once __DIR__ . '/admin.php'; wp_reset_vars( array( 'action', 'user_id', 'wp_http_referer' ) ); @@ -30,7 +30,7 @@ if ( IS_PROFILE_PAGE ) { $title = __( 'Profile' ); } else { - /* translators: %s: user's display name */ + /* translators: %s: User's display name. */ $title = __( 'Edit User %s' ); } @@ -64,7 +64,7 @@ get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on User Profiles' ) . '

' . + '

' . __( 'Documentation on User Profiles' ) . '

' . '

' . __( 'Support' ) . '

' ); @@ -127,7 +127,7 @@ if ( IS_PROFILE_PAGE ) { /** - * Fires before the page loads on the 'Your Profile' editing screen. + * Fires before the page loads on the 'Profile' editing screen. * * The action only fires if the current user is editing their own profile. * @@ -184,7 +184,7 @@ $title = sprintf( $title, $profileuser->display_name ); $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); - include( ABSPATH . 'wp-admin/admin-header.php' ); + require_once ABSPATH . 'wp-admin/admin-header.php'; ?> ID ) && current_user_can( 'manage_network_options' ) ) { ?> @@ -204,7 +204,7 @@
- +

@@ -235,14 +235,14 @@
+ > @@ -259,7 +259,11 @@ - + + + + - + - + + 1 && has_action( 'admin_color_scheme_picker' ) ) : ?> - - - + + + - - - - - - More information' ); ?> - + + + 1 ?> + + + + + + + More information' ); ?> + + - - - -
- - + + + + +
+ + - - - - - - + + + + + + locale; @@ -350,8 +365,8 @@ ) ); ?> - - + + @@ -371,7 +386,7 @@ - user_email != get_site_option( 'admin_email' ) || ! is_super_admin( $profileuser->ID ) ) : ?> + user_email, get_site_option( 'admin_email' ) ) || ! is_super_admin( $profileuser->ID ) ) : ?>

@@ -462,7 +477,7 @@ $public_display['display_lastfirst'] = $profileuser->last_name . ' ' . $profileuser->first_name; } - if ( ! in_array( $profileuser->display_name, $public_display ) ) { // Only add this if it isn't duplicated elsewhere + if ( ! in_array( $profileuser->display_name, $public_display, true ) ) { // Only add this if it isn't duplicated elsewhere. $public_display = array( 'display_displayname' => $profileuser->display_name ) + $public_display; } @@ -490,7 +505,7 @@ if ( $profileuser->ID == $current_user->ID ) : ?>

- The new address will not become active until confirmed.' ); ?> + The new address will not become active until confirmed.' ); ?>

' . esc_html( $new_email['newemail'] ) . '' ); @@ -566,8 +581,8 @@

You can change your profile picture on Gravatar.' ), __( 'https://en.gravatar.com/' ) ); @@ -602,7 +617,8 @@ * @param bool $show Whether to show the password fields. Default true. * @param WP_User $profileuser User object for the current user to edit. */ - if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ) ) : + $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ); + if ( $show_password_fields ) : ?> @@ -676,7 +692,7 @@

display_name ); ?>

@@ -689,7 +705,7 @@