Skip to content

Commit

Permalink
Use WP_Theme when switching themes. see #21075 for 3.4.
Browse files Browse the repository at this point in the history
git-svn-id: http://core.svn.wordpress.org/branches/3.4@21139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Jun 26, 2012
1 parent 40f55da commit f09dba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-admin/themes.php
Expand Up @@ -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'] ) {
Expand Down

0 comments on commit f09dba5

Please sign in to comment.