diff --git src/js/_enqueues/admin/user-profile.js src/js/_enqueues/admin/user-profile.js
index ff4830242c..e028335645 100644
|
|
|
25 | 25 | $pass1.val( $pass1.data( 'pw' ) ); |
26 | 26 | $pass1.trigger( 'pwupdate' ); |
27 | 27 | showOrHideWeakPasswordCheckbox(); |
| 28 | showOrHidePasswordHint(); |
28 | 29 | } |
29 | 30 | else { |
30 | 31 | // zxcvbn loaded after the user entered password, check strength. |
31 | 32 | check_pass_strength(); |
32 | 33 | showOrHideWeakPasswordCheckbox(); |
| 34 | showOrHidePasswordHint(); |
33 | 35 | } |
34 | 36 | |
35 | 37 | if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) { |
… |
… |
|
58 | 60 | |
59 | 61 | $pass1.removeClass( 'short bad good strong' ); |
60 | 62 | showOrHideWeakPasswordCheckbox(); |
| 63 | showOrHidePasswordHint(); |
61 | 64 | } ); |
62 | 65 | } |
63 | 66 | |
… |
… |
|
244 | 247 | } |
245 | 248 | |
246 | 249 | function showOrHideWeakPasswordCheckbox() { |
247 | | var passStrength = $('#pass-strength-result')[0]; |
| 250 | var passStrength = $( '#pass-strength-result' )[0]; |
248 | 251 | |
249 | 252 | if ( passStrength.className ) { |
250 | 253 | $pass1.addClass( passStrength.className ); |
… |
… |
|
265 | 268 | } |
266 | 269 | } |
267 | 270 | |
| 271 | function showOrHidePasswordHint() { |
| 272 | var passStrength = $( '#pass-strength-result' )[0]; |
| 273 | |
| 274 | if ( passStrength.className ) { |
| 275 | var isWeak = $( passStrength ).is( '.short, .bad' ); |
| 276 | |
| 277 | $( '.indicator-hint' ).toggle( isWeak ); |
| 278 | } |
| 279 | } |
| 280 | |
268 | 281 | $(document).ready( function() { |
269 | 282 | var $colorpicker, $stylesheet, user_id, current_user_id, |
270 | 283 | select = $( '#display_name' ), |
diff --git src/wp-admin/css/forms.css src/wp-admin/css/forms.css
index c364ca403d..7a5b4cb399 100644
|
|
fieldset label, |
565 | 565 | opacity: 1; |
566 | 566 | } |
567 | 567 | |
568 | | #pass1.short, #pass1-text.short { |
569 | | border-color: #e35b5b; |
570 | | } |
571 | | |
572 | | #pass1.bad, #pass1-text.bad { |
573 | | border-color: #f78b53; |
574 | | } |
575 | | |
576 | | #pass1.good, #pass1-text.good { |
577 | | border-color: #ffc733; |
578 | | } |
579 | | |
580 | | #pass1.strong, #pass1-text.strong { |
581 | | border-color: #83c373; |
582 | | } |
583 | | |
584 | 568 | .pw-weak { |
585 | 569 | display: none; |
586 | 570 | } |
diff --git src/wp-admin/css/login.css src/wp-admin/css/login.css
index d5c60f117a..4f096c83d3 100644
|
|
p { |
313 | 313 | |
314 | 314 | .login #pass-strength-result { |
315 | 315 | font-weight: 600; |
316 | | margin: -1px 5px 16px 0; |
| 316 | margin: 8px 5px 16px 0; |
317 | 317 | padding: 6px 5px; |
318 | 318 | text-align: center; |
319 | 319 | width: 100%; |
diff --git src/wp-login.php src/wp-login.php
index 597725e11d..b731710c73 100644
|
|
switch ( $action ) { |
871 | 871 | ?> |
872 | 872 | <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> |
873 | 873 | <p class="submit"> |
874 | | <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Get New Password' ); ?>" /> |
| 874 | <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Start Password Reset' ); ?>" /> |
875 | 875 | </p> |
876 | 876 | </form> |
877 | 877 | |
… |
… |
switch ( $action ) { |
951 | 951 | if ( ( ! $errors->has_errors() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) { |
952 | 952 | reset_password( $user, $_POST['pass1'] ); |
953 | 953 | setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); |
954 | | login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( wp_login_url() ) . '">' . __( 'Log in' ) . '</a></p>' ); |
| 954 | $new_pass_login_url = add_query_arg( array( 'reset-pass' => 'success' ), wp_login_url() ); |
| 955 | login_header( __( 'Password Reset' ), '<p class="message reset-pass">' . __( 'Your password has been reset.' ) . ' <a href="' . esc_url( $new_pass_login_url ) . '">' . __( 'Log in' ) . '</a></p>' ); |
955 | 956 | login_footer(); |
956 | 957 | exit; |
957 | 958 | } |
… |
… |
switch ( $action ) { |
959 | 960 | wp_enqueue_script( 'utils' ); |
960 | 961 | wp_enqueue_script( 'user-profile' ); |
961 | 962 | |
962 | | login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password below.' ) . '</p>', $errors ); |
| 963 | login_header( __( 'Reset Password' ), '<p class="message reset-pass">' . __( 'Enter your new password or use the suggested password.' ) . '</p>', $errors ); |
963 | 964 | |
964 | 965 | ?> |
965 | 966 | <form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off"> |
… |
… |
switch ( $action ) { |
1006 | 1007 | ?> |
1007 | 1008 | <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" /> |
1008 | 1009 | <p class="submit"> |
1009 | | <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Reset Password' ); ?>" /> |
| 1010 | <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Confirm Password Change' ); ?>" /> |
1010 | 1011 | </p> |
1011 | 1012 | </form> |
1012 | 1013 | |
… |
… |
switch ( $action ) { |
1326 | 1327 | $errors->add( 'newpass', __( 'Check your email for your new password.' ), 'message' ); |
1327 | 1328 | } elseif ( isset( $_GET['checkemail'] ) && 'registered' === $_GET['checkemail'] ) { |
1328 | 1329 | $errors->add( 'registered', __( 'Registration complete. Please check your email.' ), 'message' ); |
| 1330 | } elseif ( isset( $_GET['reset-pass'] ) && 'success' === $_GET['reset-pass'] ) { |
| 1331 | $errors->add( 'passreset', __( 'Using your new password, log in below.' ), 'message' ); |
1329 | 1332 | } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) { |
1330 | 1333 | $errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.' ), 'message' ); |
1331 | 1334 | } elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) { |