$theme = wp_get_theme( $_GET['stylesheet'] );
if ( ! $theme->exists() || ! $theme->is_allowed() )
wp_die( __( 'Cheatin’ uh?' ) );
- switch_theme($_GET['template'], $_GET['stylesheet']);
+ switch_theme( $theme->get_template(), $theme->get_stylesheet() );
wp_redirect( admin_url('themes.php?activated=true') );
exit;
} elseif ( 'delete' == $_GET['action'] ) {
) );
}
+add_thickbox();
+
endif; // switch_themes
if ( current_user_can( 'edit_theme_options' ) ) {