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
檢視更多 >