[wp-trac] [WordPress Trac] #62519: _doing_it_wrong misplaced in the _load_textdomain_just_in_time() function

WordPress Trac noreply at wordpress.org
Fri Nov 22 09:55:07 UTC 2024


#62519: _doing_it_wrong misplaced in the _load_textdomain_just_in_time() function
-----------------------------+-----------------------------
 Reporter:  babelhalsupport  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  I18N             |    Version:  6.7.1
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 In the file **l10n.php** we have the function
 ''_load_textdomain_just_in_time()''.
 The ''_doing_it_wrong()'' call is after the
 ''$wp_textdomain_registry->get( … )'' call,
 will fail if a plugin uses a language file in a custom location.
 This way ''_doing_it_wrong()'' is not called, since the code returns
 beforehand.

 **Solution:**
 Change the order of the above calls.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62519>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list