WP HOOKS
filtrod 6.4.0

pre_unzip_file

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

Opis — z kodu źródłowego

Filters archive unzipping to override with a custom process.

Parametry

ParametrTypOpis
$resultnull | true | \WP_ErrorThe result of the override. True on success, otherwise WP Error. Default null.
$filestringFull path and filename of ZIP archive.
$tostringFull path on the filesystem to extract archive to.
$needed_dirsstring[]A full list of required folders that need to be 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( '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