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

In this article

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

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.