WP HOOKS
filtrod 6.4.0

unzip_file

Args 5Plik wp-admin/includes/file.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the result of unzipping an archive.

Parametry

ParametrTypOpis
$resulttrue | \WP_ErrorThe result of unzipping the archive. True on success, otherwise WP_Error. Default true.
$filestringFull path and filename of ZIP archive.
$tostringFull path on the filesystem the archive was extracted to.
$needed_dirsstring[]A full list of required folders that were created.
$required_spacefloatThe 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( '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