unzip_file

过滤钩子
apply_filters( 'unzip_file', true, $file, $to, $needed_dirs, $required_space )
参数
  • (true|WP_Error) $result The result of unzipping the archive. True on success, otherwise WP_Error. Default true.
    Required:
  • (string) $file Full path and filename of ZIP archive.
    Required:
  • (string) $to Full path on the filesystem the archive was extracted to.
    Required:
  • (string[]) $needed_dirs A full list of required folders that were created.
    Required:
  • (float) $required_space The space required to unzip the file and copy its contents, with a 10% buffer.
    Required:
定义位置
相关勾子
pre_unzip_filesubmenu_fileuninstall_fileparent_fileunzip_file_use_ziparchive
相关方法
unzip_file_unzip_file_pclzip_unzip_file_ziparchivedid_filterlist_filescurrent_filter
引入
6.4.0
弃用
-

过滤解压档案的结果。

$result = apply_filters( 'unzip_file', true, $file, $to, $needed_dirs, $required_space );

常见问题

FAQs
查看更多 >