Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40271 closed defect (bug) (fixed)

Use get_user_locale() in Customizer

Reported by: swissspidy's profile swissspidy Owned by: swissspidy's profile 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 8 years ago.

Download all attachments as: .zip

Change History (7)

@swissspidy
8 years ago

#1 @swissspidy
8 years ago

  • Keywords has-patch added; needs-patch removed

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


8 years ago

#3 @swissspidy
8 years ago

  • Keywords commit added; dev-feedback removed

#4 @swissspidy
8 years 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
8 years ago

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

#6 @swissspidy
8 years 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.