Ticket #22401: 22401.reindented.patch
| File 22401.reindented.patch, 1.8 KB (added by , 12 years ago) |
|---|
-
wp-includes/default-filters.php
212 212 add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); 213 213 add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); 214 214 add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); 215 add_action( ' init', 'check_theme_switched', 99);215 add_action( 'switch_theme', 'check_theme_switched', 99, 4 ); 216 216 add_action( 'after_switch_theme', '_wp_sidebars_changed' ); 217 217 218 218 if ( isset( $_GET['replytocom'] ) ) -
wp-includes/theme.php
706 706 } 707 707 708 708 update_option( 'theme_switched', $old_theme->get_stylesheet() ); 709 do_action( 'switch_theme', $new_name, $new_theme );709 do_action( 'switch_theme', $new_name, $new_theme, $old_theme->get( 'Name' ), $old_theme ); 710 710 } 711 711 712 712 /** … … 1634 1634 * 1635 1635 * @since 3.3.0 1636 1636 */ 1637 function check_theme_switched() { 1638 if ( $stylesheet = get_option( 'theme_switched' ) ) { 1639 $old_theme = wp_get_theme( $stylesheet ); 1640 1641 if ( $old_theme->exists() ) 1642 do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme ); 1643 else 1644 do_action( 'after_switch_theme', $stylesheet ); 1645 1646 update_option( 'theme_switched', false ); 1647 } 1637 function check_theme_switched( $new_name, $new_theme, $old_name, $old_theme ) { 1638 if ( $old_theme->exists() ) 1639 do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme ); 1640 else 1641 do_action( 'after_switch_theme', $old_name ); 1648 1642 } 1649 1643 1650 1644 /**