WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#2383 closed defect (bug) (fixed)

$locale can only be set once.

Reported by: majelbstoat Owned by: anonymous
Priority: normal Milestone: 2.1
Component: Administration Version: 2.0
Severity: normal Keywords: locale filter getlocale bg|has-patch
Cc:

Description

get_locale() finishes early if a $locale already exists, meaning it can't be modified with a plugin after the first call of load_theme_textdomain, load_plugin_textdomain or load_default_textdomain.

This patch applies the locale filter every time getlocale() is called.

Attachments (1)

allow plugins to change the locale.diff (340 bytes) - added by majelbstoat 7 years ago.
Apply filter to locale every time.

Download all attachments as: .zip

Change History (3)

majelbstoat7 years ago

Apply filter to locale every time.

comment:1 skeltoac7 years ago

Good. I think we could use more filters in this area.

comment:2 matt7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4588]) Apply filter on locale, fixes #2383

Note: See TracTickets for help on using tickets.