validate_theme_requirements filter-hookWP 6.9.0

Filters the theme requirement validation response.

If a theme fails due to a Core-provided validation (incompatible WP, PHP versions), this filter will not fire. A WP_Error response will already be returned.

This filter is intended to add additional validation steps by site administrators.

Usage

add_filter( 'validate_theme_requirements', 'wp_kama_validate_theme_requirements_filter', 10, 2 );

/**
 * Function for `validate_theme_requirements` filter-hook.
 * 
 * @param bool|WP_Error $met_requirements True if the theme meets requirements, WP_Error if not.
 * @param string        $stylesheet       Directory name for the theme.
 *
 * @return bool|WP_Error
 */
function wp_kama_validate_theme_requirements_filter( $met_requirements, $stylesheet ){

	// filter...
	return $met_requirements;
}
$met_requirements(true|false|WP_Error)
True if the theme meets requirements, WP_Error if not.
$stylesheet(string)
Directory name for the theme.

Changelog

Since 6.9.0 Introduced.

Where the hook is called

validate_theme_requirements()
validate_theme_requirements
wp-includes/theme.php 1015
return apply_filters( 'validate_theme_requirements', true, $stylesheet );

Where the hook is used in WordPress

Usage not found.