diff --git a/wp-includes/version.php b/wp-includes/version.php index ebeea3479d..dd7ce7c95c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48303'; +$wp_version = '5.5-alpha-48304'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index 0d906fdd2d..bad0be4cb3 100644 --- a/wp-login.php +++ b/wp-login.php @@ -492,6 +492,10 @@ if ( isset( $_GET['key'] ) ) { $action = 'resetpass'; } +if ( isset( $_GET['checkemail'] ) ) { + $action = 'checkemail'; +} + $default_actions = array( 'confirm_admin_email', 'postpass', @@ -501,6 +505,7 @@ $default_actions = array( 'resetpass', 'rp', 'register', + 'checkemail', 'login', 'confirmaction', WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED, @@ -1130,6 +1135,39 @@ switch ( $action ) { login_footer( 'user_login' ); break; + case 'checkemail': + $redirect_to = admin_url(); + $errors = new WP_Error(); + + if ( 'confirm' === $_GET['checkemail'] ) { + $errors->add( + 'confirm', + sprintf( + /* translators: %s: Link to the login page. */ + __( 'Check your email for the confirmation link, then visit the login page.' ), + wp_login_url() + ), + 'message' + ); + } elseif ( 'registered' === $_GET['checkemail'] ) { + $errors->add( + 'registered', + sprintf( + /* translators: %s: Link to the login page. */ + __( 'Registration complete. Please check your email, then visit the login page.' ), + wp_login_url() + ), + 'message' + ); + } + + /** This action is documented in wp-login.php */ + $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); + + login_header( __( 'Log In' ), '', $errors ); + login_footer(); + break; + case 'confirmaction': if ( ! isset( $_GET['request_id'] ) ) { wp_die( __( 'Missing request ID.' ) ); @@ -1328,10 +1366,6 @@ switch ( $action ) { $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' ); } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { $errors->add( 'registerdisabled', __( 'User registration is currently not allowed.' ) ); - } elseif ( isset( $_GET['checkemail'] ) && 'confirm' === $_GET['checkemail'] ) { - $errors->add( 'confirm', __( 'Check your email for the confirmation link.' ), 'message' ); - } elseif ( isset( $_GET['checkemail'] ) && 'registered' === $_GET['checkemail'] ) { - $errors->add( 'registered', __( 'Registration complete. Please check your email.' ), 'message' ); } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) { $errors->add( 'updated', __( 'You have successfully updated WordPress! Please log back in to see what’s new.' ), 'message' ); } elseif ( WP_Recovery_Mode_Link_Service::LOGIN_ACTION_ENTERED === $action ) { @@ -1429,22 +1463,17 @@ switch ( $action ) {