Ticket #15648: switch_theme.15648.patch
| File switch_theme.15648.patch, 791 bytes (added by drzraf, 2 years ago) |
|---|
-
wp-includes/theme.php
1246 1246 function switch_theme($template, $stylesheet) { 1247 1247 global $wp_theme_directories; 1248 1248 1249 $old_template = get_option('template'); 1250 $old_stylesheet = get_option('stylesheet'); 1249 1251 update_option('template', $template); 1250 1252 update_option('stylesheet', $stylesheet); 1251 1253 if ( count($wp_theme_directories) > 1 ) { … … 1258 1260 $default_theme_mods = (array) get_option( "mods_$theme" ); 1259 1261 add_option( "theme_mods_$stylesheet", $default_theme_mods ); 1260 1262 } 1261 do_action('switch_theme', $t heme);1263 do_action('switch_theme', $template, $stylesheet, $old_template, $old_stylesheet); 1262 1264 } 1263 1265 1264 1266 /**