W3cubDocs

/WordPress

apply_filters( ‘pre_unzip_file’, null|true|WP_Error $result, string $file, string $to, string[] $needed_dirs, float $required_space )

Filters archive unzipping to override with a custom process.

Parameters

$resultnull|true|WP_Error
The result of the override. True on success, otherwise WP Error. Default null.
$filestring
Full path and filename of ZIP archive.
$tostring
Full path on the filesystem to extract archive to.
$needed_dirsstring[]
A full list of required folders that need to be created.
$required_spacefloat
The space required to unzip the file and copy its contents, with a 10% buffer.

Source

$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );

Changelog

Version Description
6.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_unzip_file