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