WP_Customize_Manager::after_setup_theme PHP Method

after_setup_theme() public method

Callback to validate a theme once it is loaded
Since: 3.4.0
public after_setup_theme ( )
    public function after_setup_theme()
    {
        $doing_ajax_or_is_customized = $this->doing_ajax() || isset($_POST['customized']);
        if (!$doing_ajax_or_is_customized && !validate_current_theme()) {
            wp_redirect('themes.php?broken=true');
            exit;
        }
    }
WP_Customize_Manager