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

Props sathyapulse, TimothyBlynJacobs.
Fixes #48313.

git-svn-id: https://develop.svn.wordpress.org/trunk@46788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-11-27 14:33:47 +00:00
parent 43ecd78bd3
commit 993180b9c9
1 changed files with 7 additions and 1 deletions

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 )
);
}
}