diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index c7482d8775..b2721628e3 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -534,6 +534,19 @@ function unzip_file($file, $to) { return _unzip_file_pclzip($file, $to, $needed_dirs); } +/** + * This function should not be called directly, use unzip_file instead. Attempts to unzip an archive using the ZipArchive class. + * Assumes that WP_Filesystem() has already been called and set up. + * + * @since 3.0 + * @see unzip_file + * @access private + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @param array $needed_dirs A partial list of required folders needed to be created. + * @return mixed WP_Error on failure, True on success + */ function _unzip_file_ziparchive($file, $to, $needed_dirs = array()) { global $wp_filesystem; @@ -579,6 +592,19 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array()) { return true; } +/** + * This function should not be called directly, use unzip_file instead. Attempts to unzip an archive using the PclZip library. + * Assumes that WP_Filesystem() has already been called and set up. + * + * @since 3.0 + * @see unzip_file + * @access private + * + * @param string $file Full path and filename of zip archive + * @param string $to Full path on the filesystem to extract archive to + * @param array $needed_dirs A partial list of required folders needed to be created. + * @return mixed WP_Error on failure, True on success + */ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) { global $wp_filesystem;