WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#2383 closed defect (bug) (fixed)

$locale can only be set once.

Reported by: majelbstoat Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: locale filter getlocale bg|has-patch
Focuses: 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 10 years ago.
Apply filter to locale every time.

Download all attachments as: .zip

Change History (3)

@majelbstoat10 years ago

Apply filter to locale every time.

comment:1 @skeltoac9 years ago

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

comment:2 @matt9 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.