[wp-trac] [WordPress Trac] #44937: Add _doing_it_wrong to load_plugin_textdomain
WordPress Trac
noreply at wordpress.org
Tue Oct 22 13:14:56 UTC 2024
#44937: Add _doing_it_wrong to load_plugin_textdomain
------------------------------------+-------------------------
Reporter: garrett-eclipse | Owner: swissspidy
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.7
Component: I18N | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch has-dev-note | Focuses:
------------------------------------+-------------------------
Changes (by swissspidy):
* keywords: has-patch needs-dev-note => has-patch has-dev-note
Comment:
> Which hook should it be?
Technically both are fine, as `after_setup_theme` is mostly used by themes
and `init` by plugins, but they are fired right after each other. The
current user is normally set up in-between.
`init` is used in the error message is it's easiest to understand, but if
you hook into `after_setup_theme` (e.g. in a theme) that's fine too.
Hope that clarifies it :-)
See also the existing discussion about this further above:
https://core.trac.wordpress.org/ticket/44937#comment:33
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44937#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list