--- a/wp/wp-admin/user-new.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/user-new.php Tue Sep 27 16:37:53 2022 +0200
@@ -112,6 +112,12 @@
$switched_locale = switch_to_locale( get_user_locale( $user_details ) );
+ if ( '' !== get_option( 'blogname' ) ) {
+ $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
+ } else {
+ $site_title = parse_url( home_url(), PHP_URL_HOST );
+ }
+
/* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */
$message = __(
'Hi,
@@ -127,7 +133,7 @@
$new_user_email['subject'] = sprintf(
/* translators: Joining confirmation notification email subject. %s: Site title. */
__( '[%s] Joining Confirmation' ),
- wp_specialchars_decode( get_option( 'blogname' ) )
+ $site_title
);
$new_user_email['message'] = sprintf(
$message,
@@ -245,6 +251,7 @@
}
}
+// Used in the HTML title tag.
$title = __( 'Add New User' );
$parent_file = 'users.php';
@@ -257,11 +264,11 @@
if ( is_multisite() ) {
$help .= '<p>' . __( 'Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user’s name to Edit the user profile under Network Admin > All Users.' ) . '</p>' .
- '<p>' . __( 'New users will receive an email letting them know they’ve been added as a user for your site. This email will also contain their password. Check the box if you don’t want the user to receive a welcome email.' ) . '</p>';
+ '<p>' . __( 'New users will receive an email letting them know they’ve been added as a user for your site. This email will also contain their password. Check the box if you do not want the user to receive a welcome email.' ) . '</p>';
} else {
$help .= '<p>' . __( 'New users are automatically assigned a password, which they can change after logging in. You can view or edit the assigned password by clicking the Show Password button. The username cannot be changed once the user has been added.' ) . '</p>' .
- '<p>' . __( 'By default, new users will receive an email letting them know they’ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you don’t want to send the new user a welcome email.' ) . '</p>';
+ '<p>' . __( 'By default, new users will receive an email letting them know they’ve been added as a user for your site. This email will also contain a password reset link. Uncheck the box if you do not want to send the new user a welcome email.' ) . '</p>';
}
$help .= '<p>' . __( 'Remember to click the Add New User button at the bottom of this screen when you are finished.' ) . '</p>';
@@ -505,7 +512,7 @@
<table class="form-table" role="presentation">
<tr class="form-field form-required">
<th scope="row"><label for="user_login"><?php _e( 'Username' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
- <td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" maxlength="60" /></td>
+ <td><input name="user_login" type="text" id="user_login" value="<?php echo esc_attr( $new_user_login ); ?>" aria-required="true" autocapitalize="none" autocorrect="off" autocomplete="off" maxlength="60" /></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
@@ -564,7 +571,7 @@
<div class="wp-pwd">
<?php $initial_password = wp_generate_password( 24 ); ?>
<span class="password-input-wrapper">
- <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
+ <input type="password" name="pass1" id="pass1" class="regular-text" autocomplete="new-password" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
</span>
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
@@ -577,7 +584,7 @@
<tr class="form-field form-required user-pass2-wrap hide-if-js">
<th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
<td>
- <input name="pass2" type="password" id="pass2" autocomplete="off" aria-describedby="pass2-desc" />
+ <input name="pass2" type="password" id="pass2" autocomplete="new-password" aria-describedby="pass2-desc" />
<p class="description" id="pass2-desc"><?php _e( 'Type the password again.' ); ?></p>
</td>
</tr>