Make WordPress Core

Ticket #39110: 39110.2.patch

File 39110.2.patch, 1.5 KB (added by johnbillion, 7 years ago)
  • src/wp-login.php

    diff --git src/wp-login.php src/wp-login.php
    index 5ecf5f0dbf..ec835b782f 100644
    function login_header( $title = 'Log In', $message = '', $wp_error = null ) { 
    4545        }
    4646
    4747        // Shake it!
    48         $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );
     48        $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password', 'email_disabled' );
    4949        /**
    5050         * Filters the error codes array for shaking the login form.
    5151         *
    function retrieve_password() { 
    426426        $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
    427427
    428428        if ( $message && ! wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) {
    429                 wp_die( __( 'The email could not be sent. Possible reason: your host may have disabled the mail() function.' ) );
     429                /* translators: URL to support page for resetting your password */
     430                $support = __( 'https://wordpress.org/support/article/resetting-your-password/' );
     431                $errors->add(
     432                        'email_disabled',
     433                        sprintf(
     434                                __( '<strong>ERROR</strong>: The e-mail could not be sent. Possible reason: your server may not be correctly configured to send e-mails. <a href="%s">Get support for resetting your password</a>.' ),
     435                                esc_url( $support )
     436                        )
     437                );
     438                return $errors;
    430439        }
    431440
    432441        return true;