Make WordPress Core

Ticket #44512: patch.diff

File patch.diff, 918 bytes (added by sebakurzyn, 6 years ago)

Hey guys! I added $error parameter and docs.

  • wp-login.php

    diff --git a/wp-login.php b/wp-login.php
    index e02208ae56..3b1c591237 100644
    a b switch ( $action ) { 
    584584                 */
    585585                $redirect_to = apply_filters( 'lostpassword_redirect', $lostpassword_redirect );
    586586
    587                 /**
    588                  * Fires before the lost password form.
    589                  *
    590                  * @since 1.5.1
    591                  */
    592                 do_action( 'lost_password' );
     587            /**
     588            * Fires before the lost password form.
     589            *
     590            * @since 1.5.1
     591            *
     592            * @since 5.0.0 Added the `$errors` parameter.
     593            *
     594            * @param WP_Error $errors A WP_Error object containing any errors generated
     595            *                         by using invalid credentials.
     596            */
     597            do_action( 'lost_password', $errors );
    593598
    594599                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 );
    595600