Opened 9 years ago
Closed 9 years ago
#37113 closed defect (bug) (fixed)
unload_textdomain() not working for text domains that are loaded just in time
Reported by: | swissspidy | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | General | Keywords: | has-unit-tests has-patch |
Focuses: | Cc: |
Description (last modified by )
#34114 removed the requirement to call load_plugin_textdomain()
or load_theme_textdomain()
by checking the languages directory for available translation files.
However, as pointed out by @opajaap in the support forums, unload_textdomain()
does not work anymore because of that. _load_textdomain_just_in_time()
would simply load the text domain again and again.
We need some sorts of global array to keep track of unloaded text domains, which _load_textdomain_just_in_time()
would ignore. Unloaded text domains would need to be loaded explicitly if one wants to use it again — like before.
Will whip up a patch shortly.
Attachments (4)
Change History (10)
#5
@
9 years ago
37113.2.diff extends load_textdomain()
to clear unloaded domains from the $l10n_unloaded
array so they can be manually loaded again.
Allow manual reloading of text domains