WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 1633 | * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load |
| 1634 | * |
| 1635 | * @since 3.3.0 |
| 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 | } |
| 1648 | } |
| 1649 | |
| 1650 | /** |
| 1651 | * Includes and instantiates the WP_Customize_Manager class. |
| 1652 | * |
| 1653 | * Fires when ?wp_customize=on or on wp-admin/customize.php. |