Make WordPress Core

Ticket #36010: 36010.labels-plus-new-step.01.diff

File 36010.labels-plus-new-step.01.diff, 3.2 KB (added by dcavins, 7 years ago)

Change labels to improve clarity (I hope) and add new step with more helper text,

  • 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        }