Ticket #22252: 22252.patch
File 22252.patch, 923 bytes (added by , 11 years ago) |
---|
-
wp-includes/theme.php
661 661 * @param string $stylesheet Stylesheet name 662 662 */ 663 663 function switch_theme( $stylesheet ) { 664 global $ wp_theme_directories, $sidebars_widgets;664 global $sidebars_widgets; 665 665 666 666 if ( is_array( $sidebars_widgets ) ) 667 667 set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) ); … … 679 679 update_option( 'template', $template ); 680 680 update_option( 'stylesheet', $stylesheet ); 681 681 682 if ( count( $wp_theme_directories ) > 1 ) { 683 update_option( 'template_root', get_raw_theme_root( $template, true ) ); 684 update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) ); 685 } 682 update_option( 'template_root', get_raw_theme_root( $template, true ) ); 683 update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) ); 686 684 687 685 $new_name = $new_theme->get('Name'); 688 686