[wp-trac] [WordPress Trac] #44937: Add _doing_it_wrong to load_plugin_textdomain

WordPress Trac noreply at wordpress.org
Fri Oct 4 13:27:31 UTC 2024


#44937: Add _doing_it_wrong to load_plugin_textdomain
--------------------------------------+-------------------------
 Reporter:  garrett-eclipse           |       Owner:  swissspidy
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.7
Component:  I18N                      |     Version:  4.7
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch needs-dev-note  |     Focuses:
--------------------------------------+-------------------------

Comment (by Cybr):

 Replying to [comment:38 swissspidy]:

 > In [59127], `_doing_it_wrong` warnings were added if plugins or themes
 load translations too early, either through a manual function call or
 just-in-time loading.
 >
 > Because many plugins and themes still manually call
 `load_plugin_textdomain()`, `load_theme_textdomain()` or
 `load_muplugin_textdomain()`, even though they don't have to anymore, that
 caused a lot of warnings.

 Could you please elaborate on the "they don't have to anymore" part? Are
 the textdomains autoloaded now via the plugin header or something?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44937#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list