[wp-trac] [WordPress Trac] #62244: Just-in-time translation loading for plugins/themes not in the directory

WordPress Trac noreply at wordpress.org
Wed Nov 27 14:29:12 UTC 2024


#62244: Just-in-time translation loading for plugins/themes not in the directory
--------------------------------------+-------------------------
 Reporter:  swissspidy                |       Owner:  swissspidy
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  6.8
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch needs-dev-note  |     Focuses:
--------------------------------------+-------------------------

Comment (by swissspidy):

 In [changeset:"59466" 59466]:
 {{{
 #!CommitTicketReference repository="" revision="59466"
 I18N: Do not reuse `$theme` variable name after loading a theme's
 `functions.php` file.

 The file could declare its own `$theme` variable, which would override the
 one used in the `foreach` loop.

 To prevent this, call `wp_get_theme()` before loading the file and store
 the instance in a different variable.

 Props neo2k23, swissspidy.
 See #62244.
 }}}

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


More information about the wp-trac mailing list