pre_unzip_file

pre_unzip_file

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('pre_unzip_file') is found 2 times:

  • /wp-admin/includes/file.php line 1774
    	 * @param string             $to             Full path on the filesystem to extract archive to.
    	 * @param string[]           $needed_dirs    A full list of required folders that need to be created.
    	 * @param float              $required_space The space required to unzip the file and copy its contents, with a 10% buffer.
    	 */
    	$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );
    
    	if ( null !== $pre ) {
    		// Ensure the ZIP file archive has been closed.
    		$z->close();
    
    		return $pre;
    
  • /wp-admin/includes/file.php line 1945
    		}
    	}
    
    	/** This filter is documented in src/wp-admin/includes/file.php */
    	$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );
    
    	if ( null !== $pre ) {
    		return $pre;
    	}
    
    	// Extract the files from the zip.