WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 4 weeks ago

#40271 closed defect (bug) (fixed)

Use get_user_locale() in Customizer

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

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 5 weeks ago.

Download all attachments as: .zip

Change History (7)

@swissspidy
5 weeks ago

#1 @swissspidy
5 weeks ago

  • Keywords has-patch added; needs-patch removed

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


5 weeks ago

#3 @swissspidy
4 weeks ago

  • Keywords commit added; dev-feedback removed

#4 @swissspidy
4 weeks ago

  • Owner set to swissspidy
  • Resolution set to fixed
  • Status changed from new to 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
4 weeks ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @swissspidy
4 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to 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.