WordPress.org

Make WordPress Core

Ticket #46313: 46313.diff

File 46313.diff, 762 bytes (added by earnjam, 21 months ago)
  • src/wp-settings.php

    diff --git src/wp-settings.php src/wp-settings.php
    index b54d6f39d9..8d1f43eadb 100644
    $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher(); 
    474474$GLOBALS['wp_locale_switcher']->init();
    475475
    476476// Load the functions for the active theme, for both parent and child theme if applicable.
    477 foreach ( wp_get_active_and_valid_themes() as $theme ) {
    478         if ( file_exists( $theme . '/functions.php' ) ) {
    479                 include $theme . '/functions.php';
     477foreach ( wp_get_active_and_valid_themes() as $active_theme ) {
     478        if ( file_exists( $active_theme . '/functions.php' ) ) {
     479                include $active_theme . '/functions.php';
    480480        }
    481481}
    482 unset( $theme );
     482unset( $active_theme );
    483483
    484484/**
    485485 * Fires after the theme is loaded.