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

WordPress Trac noreply at wordpress.org
Tue Oct 1 16:12:46 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 luminuu):

 I have a question regarding this notice: when the function
 `get_plugin_data()` is used in a plugin, it internally calls
 `_get_plugin_data_markup_translate()`, which has two direct
 `load_plugin_textdomain` calls. In this case, the PHP notice gets thrown
 as well. I wonder what would be the best approach here for this use case?
 From my research, it seems to be the only occurence in Core where
 `load_plugin_textdomain` is used. Ping @swissspidy

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


More information about the wp-trac mailing list