diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 01d8a88bb4..c00e34da9d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -5342,8 +5342,12 @@ function wp_auth_check_html() { '1', + 'wp_lang' => get_user_locale(), + ), $login_url ); ?> -
+
HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure ); + if ( $switched_locale ) { + restore_previous_locale(); + } + wp_safe_redirect( wp_get_referer() ); exit(); @@ -501,6 +509,10 @@ case 'logout' : $requested_redirect_to = ''; } + if ( $switched_locale ) { + restore_previous_locale(); + } + /** * Filters the log out redirect URL. * @@ -589,6 +601,11 @@ endif;