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
棄用
-

過濾解壓檔案的結果。

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

常見問題

FAQs
檢視更多 >