diff --git a/src/wp-login.php b/src/wp-login.php
index ce9cf2e857..b3714a5d24 100644
a
|
b
|
if ( ! in_array( $action, $default_actions, true ) && false === has_filter( 'log |
511 | 511 | $action = 'login'; |
512 | 512 | } |
513 | 513 | |
| 514 | if ( isset( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm' ), true ) ) { |
| 515 | $action = 'checkemailconfirm'; |
| 516 | } |
| 517 | |
514 | 518 | nocache_headers(); |
515 | 519 | |
516 | 520 | header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) ); |
… |
… |
switch ( $action ) { |
1168 | 1172 | login_footer(); |
1169 | 1173 | exit; |
1170 | 1174 | |
| 1175 | case 'checkemailconfirm': |
| 1176 | $secure_cookie = ''; |
| 1177 | $redirect_to = admin_url(); |
| 1178 | $errors = new WP_Error(); |
| 1179 | |
| 1180 | $errors->add( |
| 1181 | 'confirm', |
| 1182 | sprintf( |
| 1183 | /* Translators: 1 is a link to the login url. */ |
| 1184 | __( 'Check your email for the confirmation link. Then go to <a href="%1$s">Login Page</a>' ), |
| 1185 | wp_login_url() |
| 1186 | ), |
| 1187 | 'message' |
| 1188 | ); |
| 1189 | |
| 1190 | /** |
| 1191 | * Filters the login page errors. |
| 1192 | * |
| 1193 | * @since 3.6.0 |
| 1194 | * |
| 1195 | * @param object $errors WP Error object. |
| 1196 | * @param string $redirect_to Redirect destination URL. |
| 1197 | */ |
| 1198 | $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); |
| 1199 | login_header( __( 'Log In' ), '', $errors ); |
| 1200 | login_footer(); |
| 1201 | break; |
| 1202 | |
1171 | 1203 | case 'login': |
1172 | 1204 | default: |
1173 | 1205 | $secure_cookie = ''; |
… |
… |
switch ( $action ) { |
1328 | 1360 | $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' ); |
1329 | 1361 | } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { |
1330 | 1362 | $errors->add( 'registerdisabled', __( 'User registration is currently not allowed.' ) ); |
1331 | | } elseif ( isset( $_GET['checkemail'] ) && 'confirm' === $_GET['checkemail'] ) { |
1332 | | $errors->add( 'confirm', __( 'Check your email for the confirmation link.' ), 'message' ); |
1333 | 1363 | } elseif ( isset( $_GET['checkemail'] ) && 'newpass' === $_GET['checkemail'] ) { |
1334 | 1364 | $errors->add( 'newpass', __( 'Check your email for your new password.' ), 'message' ); |
1335 | 1365 | } elseif ( isset( $_GET['checkemail'] ) && 'registered' === $_GET['checkemail'] ) { |
… |
… |
switch ( $action ) { |
1431 | 1461 | <p id="nav"> |
1432 | 1462 | <?php |
1433 | 1463 | |
1434 | | if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ), true ) ) { |
| 1464 | if ( ! isset( $_GET['checkemail'] ) || 'newpass' !== $_GET['checkemail'] ) { |
1435 | 1465 | if ( get_option( 'users_can_register' ) ) { |
1436 | 1466 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
1437 | 1467 | |