Users: Use autocomplete values on user profiles.
Assign appropriate autocomplete values for new and edited user, user email, and password fields. Props clonemykey, sabernhardt, WraithKenny, bookdude13, konradyoast. Fixes #43886, #52714. Built from https://develop.svn.wordpress.org/trunk@53111 git-svn-id: http://core.svn.wordpress.org/trunk@52700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06ab86cee6
commit
b518b73602
|
@ -140,7 +140,7 @@ function display_setup_form( $error = null ) {
|
||||||
<td>
|
<td>
|
||||||
<div class="wp-pwd">
|
<div class="wp-pwd">
|
||||||
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
|
<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
|
||||||
<input type="password" name="admin_password" 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="admin_password" id="pass1" class="regular-text" autocomplete="new-password" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
|
||||||
<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
<button type="button" class="button wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
||||||
<span class="dashicons dashicons-hidden"></span>
|
<span class="dashicons dashicons-hidden"></span>
|
||||||
<span class="text"><?php _e( 'Hide' ); ?></span>
|
<span class="text"><?php _e( 'Hide' ); ?></span>
|
||||||
|
@ -160,7 +160,7 @@ function display_setup_form( $error = null ) {
|
||||||
</label>
|
</label>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<input name="admin_password2" type="password" id="pass2" autocomplete="off" />
|
<input name="admin_password2" type="password" id="pass2" autocomplete="new-password" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="pw-weak">
|
<tr class="pw-weak">
|
||||||
|
|
|
@ -638,7 +638,7 @@ switch ( $action ) {
|
||||||
<button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="false"><?php _e( 'Set New Password' ); ?></button>
|
<button type="button" class="button wp-generate-pw hide-if-no-js" aria-expanded="false"><?php _e( 'Set New Password' ); ?></button>
|
||||||
<div class="wp-pwd hide-if-js">
|
<div class="wp-pwd hide-if-js">
|
||||||
<span class="password-input-wrapper">
|
<span class="password-input-wrapper">
|
||||||
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
|
<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="new-password" data-pw="<?php echo esc_attr( wp_generate_password( 24 ) ); ?>" aria-describedby="pass-strength-result" />
|
||||||
</span>
|
</span>
|
||||||
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
<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>
|
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
|
||||||
|
@ -655,7 +655,7 @@ switch ( $action ) {
|
||||||
<tr class="user-pass2-wrap hide-if-js">
|
<tr class="user-pass2-wrap hide-if-js">
|
||||||
<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
|
<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
|
||||||
<td>
|
<td>
|
||||||
<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" aria-describedby="pass2-desc" />
|
<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="new-password" aria-describedby="pass2-desc" />
|
||||||
<?php if ( IS_PROFILE_PAGE ) : ?>
|
<?php if ( IS_PROFILE_PAGE ) : ?>
|
||||||
<p class="description" id="pass2-desc"><?php _e( 'Type your new password again.' ); ?></p>
|
<p class="description" id="pass2-desc"><?php _e( 'Type your new password again.' ); ?></p>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
|
|
|
@ -512,7 +512,7 @@ if ( current_user_can( 'create_users' ) ) {
|
||||||
<table class="form-table" role="presentation">
|
<table class="form-table" role="presentation">
|
||||||
<tr class="form-field form-required">
|
<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>
|
<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>
|
||||||
<tr class="form-field form-required">
|
<tr class="form-field form-required">
|
||||||
<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
|
<th scope="row"><label for="email"><?php _e( 'Email' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
|
||||||
|
@ -571,7 +571,7 @@ if ( current_user_can( 'create_users' ) ) {
|
||||||
<div class="wp-pwd">
|
<div class="wp-pwd">
|
||||||
<?php $initial_password = wp_generate_password( 24 ); ?>
|
<?php $initial_password = wp_generate_password( 24 ); ?>
|
||||||
<span class="password-input-wrapper">
|
<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>
|
</span>
|
||||||
<button type="button" class="button wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
<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>
|
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
|
||||||
|
@ -584,7 +584,7 @@ if ( current_user_can( 'create_users' ) ) {
|
||||||
<tr class="form-field form-required user-pass2-wrap hide-if-js">
|
<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>
|
<th scope="row"><label for="pass2"><?php _e( 'Repeat Password' ); ?> <span class="description"><?php _e( '(required)' ); ?></span></label></th>
|
||||||
<td>
|
<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>
|
<p class="description" id="pass2-desc"><?php _e( 'Type the password again.' ); ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.0-alpha-53110';
|
$wp_version = '6.0-alpha-53111';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -951,7 +951,7 @@ switch ( $action ) {
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="wp-pwd">
|
<div class="wp-pwd">
|
||||||
<input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="off" aria-describedby="pass-strength-result" />
|
<input type="password" data-reveal="1" data-pw="<?php echo esc_attr( wp_generate_password( 16 ) ); ?>" name="pass1" id="pass1" class="input password-input" size="24" value="" autocomplete="new-password" aria-describedby="pass-strength-result" />
|
||||||
|
|
||||||
<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
|
<button type="button" class="button button-secondary 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>
|
<span class="dashicons dashicons-hidden" aria-hidden="true"></span>
|
||||||
|
@ -966,7 +966,7 @@ switch ( $action ) {
|
||||||
|
|
||||||
<p class="user-pass2-wrap">
|
<p class="user-pass2-wrap">
|
||||||
<label for="pass2"><?php _e( 'Confirm new password' ); ?></label>
|
<label for="pass2"><?php _e( 'Confirm new password' ); ?></label>
|
||||||
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
|
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="new-password" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
|
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
|
||||||
|
|
Loading…
Reference in New Issue