WordPress.org

Make WordPress Core

Ticket #40605: 40605.diff

File 40605.diff, 1.3 KB (added by hankthetank, 4 years ago)
  • src/wp-login.php

    diff --git a/src/wp-login.php b/src/wp-login.php
    index 6c5769c..28517be 100644
    a b if ( isset($_GET['key']) ) 
    391391if ( !in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login' ), true ) && false === has_filter( 'login_form_' . $action ) )
    392392        $action = 'login';
    393393
     394if ( isset($_GET['checkemail']) && $_GET['checkemail'] )
     395    $action = 'check-email';
     396
    394397nocache_headers();
    395398
    396399header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
    case 'register' : 
    752755login_footer('user_login');
    753756break;
    754757
     758case 'check-email' :
     759
     760    $redirect_to = admin_url();
     761
     762    if ( isset( $_GET['checkemail'] ) && 'confirm' == $_GET['checkemail'] ) {
     763        $errors = new WP_Error();
     764        $errors->add('confirm', __('Check your email for the confirmation link.'), 'message');
     765    }
     766
     767    /**
     768     * Filters the login page errors.
     769     *
     770     * @since 3.6.0
     771     *
     772     * @param object $errors      WP Error object.
     773     * @param string $redirect_to Redirect destination URL.
     774     */
     775    $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to );
     776    login_header(__('Log In'), '', $errors);
     777
     778    login_footer();
     779    break;
     780
    755781case 'login' :
    756782default:
    757783        $secure_cookie = '';