Make WordPress Core

Changeset 20163


Ignore:
Timestamp:
03/08/2012 09:22:24 PM (13 years ago)
Author:
nacin
Message:

Store stylesheet rather than theme name in the theme_switched option. see #20103.

File:
1 edited

Legend:

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

    r20162 r20163  
    747747    }
    748748
    749     update_option( 'theme_switched', $old_theme->get('Name') );
     749    update_option( 'theme_switched', $old_theme->get_stylesheet() );
    750750    do_action( 'switch_theme', $new_name, $new_theme );
    751751}
     
    15651565 */
    15661566function check_theme_switched() {
    1567     if ( false !== ( $old_theme = get_option( 'theme_switched' ) ) && !empty( $old_theme ) ) {
    1568         do_action( 'after_switch_theme', $old_theme );
     1567    if ( $stylesheet = get_option( 'theme_switched' ) ) {
     1568        $old_theme = wp_get_theme( $stylesheet );
     1569        do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme );
    15691570        update_option( 'theme_switched', false );
    15701571    }
Note: See TracChangeset for help on using the changeset viewer.