diff --git a/wp-includes/version.php b/wp-includes/version.php index 74a0da422c..d06641e588 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59465'; +$wp_version = '6.8-alpha-59466'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-settings.php b/wp-settings.php index 98ab4d68d0..44c04a3a7b 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -679,14 +679,15 @@ $GLOBALS['wp_locale_switcher']->init(); // Load the functions for the active theme, for both parent and child theme if applicable. foreach ( wp_get_active_and_valid_themes() as $theme ) { + $wp_theme = wp_get_theme( basename( $theme ) ); + if ( file_exists( $theme . '/functions.php' ) ) { include $theme . '/functions.php'; } - $theme = wp_get_theme( basename( $theme ) ); - $theme->load_textdomain(); + $wp_theme->load_textdomain(); } -unset( $theme ); +unset( $theme, $wp_theme ); /** * Fires after the theme is loaded.