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 |
---|---|
1606 | * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load |
1607 | * |
1608 | * @since 3.3.0 |
1609 | */ |
1610 | function check_theme_switched() { |
1611 | if ( $stylesheet = get_option( 'theme_switched' ) ) { |
1612 | $old_theme = wp_get_theme( $stylesheet ); |
1613 |
|
1614 | if ( $old_theme->exists() ) |
1615 | do_action( 'after_switch_theme', $old_theme->get('Name'), $old_theme ); |
1616 | else |
1617 | do_action( 'after_switch_theme', $stylesheet ); |
1618 |
|
1619 | update_option( 'theme_switched', false ); |
1620 | } |
1621 | } |
1622 |
|
1623 | /** |
1624 | * Includes and instantiates the WP_Customize_Manager class. |
1625 | * |
1626 | * Fires when ?wp_customize=on or on wp-admin/customize.php. |