WordPress.org

Make WordPress Core

Ticket #38079: 38079.patch

File 38079.patch, 2.3 KB (added by jfarthing84, 4 years ago)
  • wp-login.php

     
    528528         */
    529529        do_action( 'lost_password' );
    530530
     531        /**
     532         * Fires before the lost password form.
     533         *
     534         * @since 4.7
     535         */
     536        do_action( 'pre_lostpassword_form' );
     537
    531538        login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors);
    532539
    533540        $user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : '';
     
    614621        if ( ( ! $errors->get_error_code() ) && isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) {
    615622                reset_password($user, $_POST['pass1']);
    616623                setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true );
     624
     625                /**
     626                 * Fires before the password reset form.
     627                 *
     628                 * @since 4.7
     629                 */
     630                do_action( 'pre_resetpass_form' );
     631
    617632                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>' );
    618633                login_footer();
    619634                exit;
     
    622637        wp_enqueue_script('utils');
    623638        wp_enqueue_script('user-profile');
    624639
     640        /**
     641         * Fires before the password reset form.
     642         *
     643         * @since 4.7
     644         */
     645        do_action( 'pre_resetpass_form' );
     646
    625647        login_header(__('Reset Password'), '<p class="message reset-pass">' . __('Enter your new password below.') . '</p>', $errors );
    626648
    627649?>
     
    719741         * @param string $registration_redirect The redirect destination URL.
    720742         */
    721743        $redirect_to = apply_filters( 'registration_redirect', $registration_redirect );
     744
     745        /**
     746         * Fires before the registration form.
     747         *
     748         * @since 4.7
     749         */
     750        do_action( 'pre_register_form' );
     751
    722752        login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
    723753?>
    724754<form name="registerform" id="registerform" action="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?>" method="post" novalidate="novalidate">
     
    883913        if ( $reauth )
    884914                wp_clear_auth_cookie();
    885915
     916        /**
     917         * Fires before the login form.
     918         *
     919         * @since 4.7
     920         */
     921        do_action( 'pre_login_form' );
     922
    886923        login_header(__('Log In'), '', $errors);
    887924
    888925        if ( isset($_POST['log']) )