Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(révision 17369)
+++ wp-includes/theme.php	(copie de travail)
@@ -1246,6 +1246,8 @@
 function switch_theme($template, $stylesheet) {
 	global $wp_theme_directories;
 
+	$old_template = get_option('template');
+	$old_stylesheet = get_option('stylesheet');
 	update_option('template', $template);
 	update_option('stylesheet', $stylesheet);
 	if ( count($wp_theme_directories) > 1 ) {
@@ -1258,7 +1260,7 @@
 		$default_theme_mods = (array) get_option( "mods_$theme" );
 		add_option( "theme_mods_$stylesheet", $default_theme_mods );
 	}
-	do_action('switch_theme', $theme);
+	do_action('switch_theme', $template, $stylesheet, $old_template, $old_stylesheet);
 }
 
 /**
