filtrod 6.4.0
pre_unzip_file
Opis — z kodu źródłowego
Filters archive unzipping to override with a custom process.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$result | null | true | \WP_Error | The result of the override. True on success, otherwise WP Error. Default null. |
$file | string | Full path and filename of ZIP archive. |
$to | string | Full path on the filesystem to extract archive to. |
$needed_dirs | string[] | A full list of required folders that need to be created. |
$required_space | float | The space required to unzip the file and copy its contents, with a 10% buffer. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_unzip_file', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_unzip_file', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii