From dc936c54c1e4fe4f557cb69a44a0fe328432e7a8 Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 8 Sep 2011 20:59:41 +0000 Subject: [PATCH] Rename the newly added action 'after_theme_change' to 'after_switch_theme' so it matches the 'switch_theme' action, props scribu, see #17979 git-svn-id: http://svn.automattic.com/wordpress/trunk@18656 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 2 +- wp-includes/theme.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 1c69f3805..64e193fc5 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -219,7 +219,7 @@ add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 ); add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); add_action( 'init', 'check_theme_switched', 99 ); -add_action( 'after_theme_change', '_wp_sidebars_changed' ); +add_action( 'after_switch_theme', '_wp_sidebars_changed' ); if ( isset( $_GET['replytocom'] ) ) add_filter( 'pre_option_blog_public', '__return_zero' ); diff --git a/wp-includes/theme.php b/wp-includes/theme.php index d30a67992..1b9a36c94 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1994,13 +1994,13 @@ function _delete_attachment_theme_mod( $id ) { add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); /** - * Checks if a theme has been changed and runs 'after_theme_change' hook on the next WP load + * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load * * @since 3.3 - */ + */ function check_theme_switched() { if ( false !== ( $old_theme = get_option( 'theme_switched' ) ) && !empty( $old_theme ) ) { - do_action( 'after_theme_change', $old_theme ); + do_action( 'after_switch_theme', $old_theme ); update_option( 'theme_switched', false ); } }