WP_Customize_Manager::after_setup_theme()

In this article

Callback to validate a theme once it is loaded

Source

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;
	}
}

Changelog

VersionDescription
3.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.