Make WordPress Core


Ignore:
Timestamp:
06/26/2012 05:21:04 AM (13 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/themes.php

    r21106 r21131  
    2121        if ( ! $theme->exists() || ! $theme->is_allowed() )
    2222            wp_die( __( 'Cheatin’ uh?' ) );
    23         switch_theme($_GET['template'], $_GET['stylesheet']);
     23        switch_theme( $theme->get_stylesheet() );
    2424        wp_redirect( admin_url('themes.php?activated=true') );
    2525        exit;
Note: See TracChangeset for help on using the changeset viewer.