pre_unzip_file

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

过滤档案解压以使用自定义流程进行覆盖。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );
$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );
$pre = apply_filters( 'pre_unzip_file', null, $file, $to, $needed_dirs, $required_space );

常见问题

FAQs
查看更多 >