Make WordPress Core

Changeset 16958


Ignore:
Timestamp:
12/15/2010 05:39:00 PM (12 years ago)
Author:
nacin
Message:

Add theme_mods option if is_admin. props MarkJaquith, fixes #14828.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r16925 r16958  
    12571257    delete_option('current_theme');
    12581258    $theme = get_current_theme();
     1259    if ( is_admin() && false === get_option( "theme_mods_$stylesheet" ) ) {
     1260        $default_theme_mods = (array) get_option( "mods_$theme" );
     1261        add_option( "theme_mods_$stylesheet", $default_theme_mods );
     1262    }
    12591263    do_action('switch_theme', $theme);
    12601264}
Note: See TracChangeset for help on using the changeset viewer.