WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#37113 closed defect (bug)

unload_textdomain() not working for text domains that are loaded just in time — at Initial Version

Reported by: swissspidy Owned by:
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: General Keywords: has-unit-tests has-patch
Focuses: Cc:

Description

#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 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.

Change History (0)

Note: See TracTickets for help on using tickets.