WP HOOKS
filtrod 6.9.0

validate_theme_requirements

Args 2Plik wp-includes/theme.phpDokumentacja WP ↗

Opis — z kodu źródłowego

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.

Parametry

ParametrTypOpis
$met_requirementsbool | \WP_ErrorTrue if the theme meets requirements, WP_Error if not.
$stylesheetstringDirectory name for the theme.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'validate_theme_requirements', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii