Filters the result of unzipping an archive.
$resulttrue|WP_Error$filestring$tostring$needed_dirsstring[]$required_spacefloatwp-admin/includes/file.php:1853_unzip_file_ziparchive()wp-admin/includes/file.php:2000_unzip_file_pclzip() * @param true|WP_Error $result The result of unzipping the archive. True on success, otherwise WP_Error. Default true. * @param string $file Full path and filename of ZIP archive. * @param string $to Full path on the filesystem the archive was extracted to. * @param string[] $needed_dirs A full list of required folders that were created. * @param float $required_space The space required to unzip the file and copy its contents, with a 10% buffer. */ $result = apply_filters( 'unzip_file', true, $file, $to, $needed_dirs, $required_space ); unset( $needed_dirs ); return $result;}Introduced in 6.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.