WordPress.org

Make WordPress Core

Ticket #14828: 14828.diff

File 14828.diff, 506 bytes (added by nacin, 8 years ago)
  • wp-includes/theme.php

     
    12681268        }
    12691269        delete_option('current_theme');
    12701270        $theme = get_current_theme();
     1271        if ( false === get_option( "theme_mods_$stylesheet" ) ) {
     1272                $default_theme_mods = (array) get_option( "mods_$theme" );
     1273                add_option( "theme_mods_$stylesheet", $default_theme_mods );
     1274        }
    12711275        do_action('switch_theme', $theme);
    12721276}
    12731277