[wp-trac] [WordPress Trac] #46325: wp 5.1 brake some themes working perfectly before, cause found
WordPress Trac
noreply at wordpress.org
Fri Feb 22 22:28:59 UTC 2019
#46325: wp 5.1 brake some themes working perfectly before, cause found
--------------------------+-----------------------------
Reporter: bufny | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In wp-settings.php from wp5.1 there are the following lines of code (not
present before):
{{{#!php
<?php
// Load the functions for the active theme, for both parent and child
theme if applicable.
foreach ( wp_get_active_and_valid_themes() as $theme ) {
if ( file_exists( $theme . '/functions.php' ) ) {
include $theme . '/functions.php';
}
}
unset( $theme );
}}}
If the active theme is using the $theme as a global variable things mess
up. I don't know who should refactor this (the wp core team or the
hundreds theme creators), but the name of the variable here is
unfortunately chosen.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46325>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list