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

WordPress Trac noreply at wordpress.org
Thu Sep 13 09:33:59 UTC 2018


#44937: Add _doing_it_wrong to load_plugin_textdomain
-----------------------------+------------------------------
 Reporter:  garrett-eclipse  |       Owner:  (none)
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:  4.7
 Severity:  normal           |  Resolution:
 Keywords:  2nd-opinion      |     Focuses:
-----------------------------+------------------------------

Comment (by garrett-eclipse):

 And a last thought;

 Would it be useful to have a `_doing_actions_wrong` function to streamline
 things and make it elegant because `Code is Poetry`.

 It could possibly take three parameters;[[BR]]
 string|array - The action(s) required by this function.[[BR]]
 semvar - The version this requirement was introduced/updated[[BR]]
 conditional - AND/OR - control if actions are dependent

 This would allow the translation to be consistent, adding a single string
 for i18n similar to;[[BR]]
 https://github.com/WordPress/WordPress/blob/56c162fbc9867f923862f64f1b4570d885f1ff03
 /wp-includes/functions.wp-scripts.php#L36-L52

 This would simply call the `_doing_it_wrong` function with standardized
 strings and the current __FUNCTION__.

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


More information about the wp-trac mailing list