WordPress.org

Make WordPress Core

Ticket #36010: 36010-testing.1.diff

File 36010-testing.1.diff, 5.1 KB (added by dcavins, 2 years ago)

A combined patch for testing. This includes the changes in the three patches already submitted. Thanks for testing!

  • src/wp-admin/css/forms.css

    diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css
    index 6b36d20..24ee750 100644
    a b fieldset label, 
    479479        opacity: 1;
    480480}
    481481
    482 #pass1.short, #pass1-text.short {
    483         border-color: #e35b5b;
    484 }
    485 
    486 #pass1.bad, #pass1-text.bad {
    487         border-color: #f78b53;
    488 }
    489 
    490 #pass1.good, #pass1-text.good {
    491         border-color: #ffc733;
    492 }
    493 
    494 #pass1.strong, #pass1-text.strong {
    495         border-color: #83c373;
    496 }
    497 
    498482.pw-weak {
    499483        display:none;
    500484}
  • src/wp-admin/css/login.css

    diff --git a/src/wp-admin/css/login.css b/src/wp-admin/css/login.css
    index 5da174c..fba7f5f 100644
    a b p { 
    220220
    221221.login #pass-strength-result {
    222222        font-weight: 600;
    223         margin: -1px 5px 16px 0;
     223        margin: 8px 5px 16px 0;
    224224        padding: 6px 5px;
    225225        text-align: center;
    226226        width: 100%;
  • src/wp-admin/js/user-profile.js

    diff --git a/src/wp-admin/js/user-profile.js b/src/wp-admin/js/user-profile.js
    index e95a428..10aeb17 100644
    a b  
    3636                        $pass1.val( $pass1.data( 'pw' ) );
    3737                        $pass1.trigger( 'pwupdate' );
    3838                        showOrHideWeakPasswordCheckbox();
     39                        showOrHidePasswordHint();
    3940                }
    4041                else {
    4142                        // zxcvbn loaded after the user entered password, check strength.
    4243                        check_pass_strength();
    4344                        showOrHideWeakPasswordCheckbox();
     45                        showOrHidePasswordHint();
    4446                }
    4547
    4648                if ( 1 !== parseInt( $toggleButton.data( 'start-masked' ), 10 ) ) {
     
    9395                        }
    9496                        $pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
    9597                        showOrHideWeakPasswordCheckbox();
     98                        showOrHidePasswordHint();
    9699                } );
    97100        }
    98101
     
    326329                }
    327330        }
    328331
     332        function showOrHidePasswordHint() {
     333                $( '.indicator-hint' ).toggle( $( '#pass-strength-result' ).is( '.short, .bad' ) );
     334        }
     335
    329336        $(document).ready( function() {
    330337                var $colorpicker, $stylesheet, user_id, current_user_id,
    331338                        select       = $( '#display_name' ),
  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index e237665..08a0891 100644
    a b case 'retrievepassword' : 
    557557         */
    558558        do_action( 'lostpassword_form' ); ?>
    559559        <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
    560         <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Get New Password'); ?>" /></p>
     560        <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Start Password Reset'); ?>" /></p>
    561561</form>
    562562
    563563<p id="nav">
    case 'rp' : 
    626626        if ( ( ! $errors->get_error_code() ) && isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) {
    627627                reset_password($user, $_POST['pass1']);
    628628                setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
    629                 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>' );
     629                $new_pass_login_url = add_query_arg( array( 'reset-pass' => 'success' ), wp_login_url() );
     630                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>' );
    630631                login_footer();
    631632                exit;
    632633        }
    case 'rp' : 
    634635        wp_enqueue_script('utils');
    635636        wp_enqueue_script('user-profile');
    636637
    637         login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
     638        login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password or use the suggested password.') . '</p>', $errors );
    638639
    639640?>
    640641<form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off">
    case 'rp' : 
    681682        do_action( 'resetpass_form', $user );
    682683        ?>
    683684        <input type="hidden" name="rp_key" value="<?php echo esc_attr( $rp_key ); ?>" />
    684         <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Reset Password'); ?>" /></p>
     685        <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Confirm Password Change'); ?>" /></p>
    685686</form>
    686687
    687688<p id="nav">
    default: 
    891892                        $errors->add('newpass', __('Check your email for your new password.'), 'message');
    892893                elseif  ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] )
    893894                        $errors->add('registered', __('Registration complete. Please check your email.'), 'message');
     895                elseif  ( isset($_GET['reset-pass']) && 'success' == $_GET['reset-pass'] )
     896                        $errors->add('passreset', __('Using your new password, log in below.'), 'message');
    894897                elseif ( strpos( $redirect_to, 'about.php?updated' ) )
    895898                        $errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what&#8217;s new.' ), 'message' );
    896899        }