unzip_file_use_ziparchive filter-hookWP 3.0.0

Filters whether to use ZipArchive to unzip archives.

Usage

add_filter( 'unzip_file_use_ziparchive', 'wp_kama_unzip_file_use_ziparchive_filter' );

/**
 * Function for `unzip_file_use_ziparchive` filter-hook.
 * 
 * @param bool $ziparchive Whether to use ZipArchive.
 *
 * @return bool
 */
function wp_kama_unzip_file_use_ziparchive_filter( $ziparchive ){

	// filter...
	return $ziparchive;
}
$ziparchive(true|false)
Whether to use ZipArchive.
Default: true

Changelog

Since 3.0.0 Introduced.

Where the hook is called

unzip_file()
unzip_file_use_ziparchive
wp-admin/includes/file.php 1589
if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {

Where the hook is used in WordPress

Usage not found.