From f09dba5b92c500c93e7c3ca91bce81caf8473043 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 26 Jun 2012 19:10:05 +0000 Subject: [PATCH] Use WP_Theme when switching themes. see #21075 for 3.4. git-svn-id: http://core.svn.wordpress.org/branches/3.4@21139 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/themes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 465626d2d9b5..cbcde87cad97 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -20,7 +20,7 @@ $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'] ) {