Ticket #22401: 22401.patch
| File 22401.patch, 1.7 KB (added by , 14 years ago) |
|---|
-
wp-includes/default-filters.php
211 211 add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 212 212 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); 213 213 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); 214 add_action( ' init', 'check_theme_switched', 99);214 add_action( 'switch_theme', 'check_theme_switched', 99, 4 ); 215 215 add_action( 'after_switch_theme', '_wp_sidebars_changed' ); 216 216 217 217 if ( isset( $_GET['replytocom'] ) ) -
wp-includes/theme.php
694 694 } 695 695 696 696 update_option( 'theme_switched', $old_theme->get_stylesheet() ); 697 do_action( 'switch_theme', $new_name, $new_theme );697 do_action( 'switch_theme', $new_name, $new_theme, $old_theme->get( 'Name' ), $old_theme ); 698 698 } 699 699 700 700 /** … … 1599 1599 * 1600 1600 * @since 3.3.0 1601 1601 */ 1602 function check_theme_switched() { 1603 if ( $stylesheet = get_option( 'theme_switched' ) ) { 1604 $old_theme = wp_get_theme( $stylesheet ); 1605 1602 function check_theme_switched( $new_name, $new_theme, $old_name, $old_theme ) { 1606 1603 if ( $old_theme->exists() ) 1607 1604 do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme ); 1608 1605 else 1609 do_action( 'after_switch_theme', $stylesheet ); 1610 1611 update_option( 'theme_switched', false ); 1612 } 1606 do_action( 'after_switch_theme', $old_name ); 1613 1607 } 1614 1608 1615 1609 /**