WP HOOKS
filtrod 6.9.0

validate_plugin_requirements

Args 2Plik wp-admin/includes/plugin.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the plugin requirement validation response.

If a plugin 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 plugin meets requirements, WP_Error if not.
$pluginstringPath to the plugin file relative to the plugins directory.

Wywołanie

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

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

Popularne w tej kategorii