From 0b4f35262fb08fbf169b691ff34dc3703c738a00 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 3 Apr 2017 22:40:59 +0000 Subject: [PATCH] Customize: Use `get_user_locale()` in customizer body class. Otherwise CSS specific to the site's locale would be applied, even though the customizer is displayed in the user's locale. See #29783. Fixes #40271. Merges [40368] to the 4.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40369 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/customize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index 44654c003f..f1e66ff3dd 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -102,7 +102,7 @@ if ( $wp_customize->is_ios() ) { if ( is_rtl() ) { $body_class .= ' rtl'; } -$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); +$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) ); $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading…' ) );