switch_theme

switch_theme

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

do_action('switch_theme') is found 1 times:

  • /wp-includes/theme.php line 878
    	 * @param string   $new_name  Name of the new theme.
    	 * @param WP_Theme $new_theme WP_Theme instance of the new theme.
    	 * @param WP_Theme $old_theme WP_Theme instance of the old theme.
    	 */
    	do_action( 'switch_theme', $new_name, $new_theme, $old_theme );
    }
    
    /**
     * Checks that the active theme has the required files.
     *
     * Standalone themes need to have a `templates/index.html` or `index.php` template file.
    

See this hook used in plugins: