filtrod 6.9.0
validate_plugin_requirements
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
| Parametr | Typ | Opis |
|---|---|---|
$met_requirements | bool | \WP_Error | True if the plugin meets requirements, WP_Error if not. |
$plugin | string | Path 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
}
// 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