WordPress.org

Make WordPress Core

Ticket #32116: 32116.diff

File 32116.diff, 515 bytes (added by iamfriendly, 4 years ago)

Added the errors object to the lospassword_post action. Includes updated docs.

  • wp-login.php

    diff --git wp-login.php wp-login.php
    index 5b3daaa..7eb1a0c 100644
    function retrieve_password() { 
    295295         * Fires before errors are returned from a password reset request.
    296296         *
    297297         * @since 2.1.0
     298         *
     299         * @param WP_Error $errors A WP_Error object containing any errors generated by using invalid credentials (since 4.4.0)
    298300         */
    299         do_action( 'lostpassword_post' );
     301        do_action( 'lostpassword_post', $errors );
    300302
    301303        if ( $errors->get_error_code() )
    302304                return $errors;