diff --git a/wp-includes/theme.php b/wp-includes/theme.php index a9f0e6ed8d..07b0f6a208 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -690,16 +690,14 @@ function switch_theme( $stylesheet ) { $nav_menu_locations = get_theme_mod( 'nav_menu_locations' ); - $old_theme = wp_get_theme(); - $new_theme = wp_get_theme( $stylesheet ); - if ( func_num_args() > 1 ) { - $template = $stylesheet; $stylesheet = func_get_arg( 1 ); - } else { - $template = $new_theme->get_template(); } + $old_theme = wp_get_theme(); + $new_theme = wp_get_theme( $stylesheet ); + $template = $new_theme->get_template(); + update_option( 'template', $template ); update_option( 'stylesheet', $stylesheet ); diff --git a/wp-includes/version.php b/wp-includes/version.php index af10877665..28368bd191 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33814'; +$wp_version = '4.4-alpha-33815'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.