WordPress.org

Make WordPress Core

Ticket #49521: lostpassword_errors_filter.diff

File lostpassword_errors_filter.diff, 667 bytes (added by wpdo5ea, 7 months ago)
  • wp-login.php

     
    387387         */
    388388        do_action( 'lostpassword_post', $errors, $user_data );
    389389
     390        /**
     391         * Filters the errors encountered from a password reset request.
     392         *
     393         * @since 5.4.0
     394         *
     395         * @param WP_Error $errors               A WP_Error object containing any errors encountered.
     396         *
     397         * @param WP_User|false    WP_User object if found, false if the user does not exist.
     398         */
     399        $errors = apply_filters( 'lostpassword_errors', $errors, $user_data );
     400
    390401        if ( $errors->has_errors() ) {
    391402                return $errors;
    392403        }