Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#40271 closed defect (bug) (fixed)

Use get_user_locale() in Customizer

Reported by: swissspidy Owned by: swissspidy
Priority: normal Milestone: 4.7.4
Component: Customize Version: 4.7
Severity: normal Keywords: has-patch commit fixed-major
Cc: Focuses:

Description

In wp-admin/customize.php, get_locale() is being used to add a locale-$sitelocalebody class, which leads to some CSS being applied to the customizer even though the locale isn't used.

To reproduce:

  1. Set user language to en_US
  2. Set site language to anything else, e.g. de_DE
  3. Notice that the body class is locale-de-de and therefore some specific CSS for de_DE is being applied, even though all the text in the customizer is in en_US.

Attachments (1)

40271.diff​ (580 bytes ) - added by swissspidy 10 years ago.

Download all attachments as: .zip

Change History (7)

@swissspidy
10 years ago

#1 @swissspidy
10 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in ​Slack in #core-i18n by swissspidy. ​View the logs.


10 years ago

#3 @swissspidy
10 years ago

  • Keywords commit added; dev-feedback removed

#4 @swissspidy
10 years ago

  • Owner set to swissspidy
  • Resolution → fixed
  • Status new → closed

In 40368:

Customize: User 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.

#5 @swissspidy
10 years ago

  • Keywords fixed-major added
  • Resolution fixed
  • Status closed → reopened

#6 @swissspidy
10 years ago

  • Resolution → fixed
  • Status reopened → closed

In 40369:

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.

Note: See TracTickets for help on using tickets.