Make WordPress Core


Ignore:
Timestamp:
06/26/2012 05:21:04 AM (12 years ago)
Author:
nacin
Message:

Allow switch_theme() to take a single $stylesheet argument.

It now effectively has two function definitions:
function switch_theme( $stylesheet )
function switch_theme( $template, $stylesheet )

fixes #21075.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r21080 r21131  
    954954            return $return;
    955955
    956         // Ensure stylesheet name hasnt changed after the upgrade:
    957         // @TODO: Note, This doesn't handle the Template changing, or the Template name changing.
     956        // Ensure stylesheet name hasn't changed after the upgrade:
    958957        if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
    959             $theme_info = $this->theme_info();
     958            wp_clean_themes_cache();
    960959            $stylesheet = $this->result['destination_name'];
    961             $template = $theme_info->get_template();
    962             switch_theme($template, $stylesheet, true);
     960            switch_theme( $stylesheet );
    963961        }
    964962
Note: See TracChangeset for help on using the changeset viewer.