[wp-trac] [WordPress Trac] #62547: Notice for _load_textdomain_just_in_time despite correct use of init hook
WordPress Trac
noreply at wordpress.org
Sat Nov 23 09:12:12 UTC 2024
#62547: Notice for _load_textdomain_just_in_time despite correct use of init hook
-----------------------------+-----------------------------
Reporter: markhowellsmead | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
The notice “''Notice: Function _load_textdomain_just_in_time was called
incorrectly. Translation loading for the pt-must-use domain was triggered
too early. This is usually an indicator for some code in the plugin or
theme running too early. Translations should be loaded at the init action
or later.''” is being thrown in a private plugin. The call to
load_plugin_text_domain is as follows.
{{{
function ptMustUseTranslations()
{
load_plugin_textdomain('pt-must-use', false, __DIR__ .
'/languages');
}
add_action('init', 'ptMustUseTranslations');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62547>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list