Users: Display admin email verification screen in user's locale instead of site locale.

Props sathyapulse, TimothyBlynJacobs.
Fixes #48313.
Built from https://develop.svn.wordpress.org/trunk@46788


git-svn-id: http://core.svn.wordpress.org/trunk@46588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-11-27 14:35:02 +00:00
parent c74c8cf5f1
commit e2c2fb64bf
2 changed files with 8 additions and 2 deletions

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-46786';
$wp_version = '5.4-alpha-46788';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -1254,7 +1254,13 @@ switch ( $action ) {
$admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );
if ( $admin_email_check_interval > 0 && time() > $admin_email_lifespan ) {
$redirect_to = add_query_arg( 'action', 'confirm_admin_email', wp_login_url( $redirect_to ) );
$redirect_to = add_query_arg(
array(
'action' => 'confirm_admin_email',
'wp_lang' => get_user_locale( $user ),
),
wp_login_url( $redirect_to )
);
}
}