[wp-trac] [WordPress Trac] #57056: Pass $locale to override_load_textdomain filter
WordPress Trac
noreply at wordpress.org
Thu Feb 2 21:30:09 UTC 2023
#57056: Pass $locale to override_load_textdomain filter
---------------------------------------------+-----------------------
Reporter: ocean90 | Owner: audrasjb
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.2
Component: I18N | Version: 6.1
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch commit | Focuses:
---------------------------------------------+-----------------------
Changes (by audrasjb):
* owner: (none) => audrasjb
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"55196" 55196]:
{{{
#!CommitTicketReference repository="" revision="55196"
I18N: Pass `$locale` parameter to `override_load_textdomain` filter.
In [53874] the `$locale` parameter was added to `load_textdomain()` so it
can be used to properly fill `WP_Textdomain_Registry`. Since `$locale` may
not be the same value as `determine_locale()` returns (e.g. when filtered
by `plugin_locale` in `load_plugin_textdomain()`) this changeset also
passes the `$locale` parameter to the filter so custom file loading
implementations are using the same locale as `load_textdomain()` got.
Follow-up to [53874].
Props ocean90, cadic, SergeyBiryukov, swissspidy, costdev.
Fixes #57056.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57056#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list