filtrod 2.8.0
upgrader_pre_install
Opis — z kodu źródłowego
Filters the installation response before the installation has started.
Returning a value that could be evaluated as a WP_Error will effectively short-circuit the installation, returning that value instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$response | bool | \WP_Error | Installation response. |
$hook_extra | array | Extra arguments passed to hooked filters. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'upgrader_pre_install', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'upgrader_pre_install', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii