unzip_file_use_ziparchive

過濾鉤子
apply_filters( 'unzip_file_use_ziparchive', true )
引數
  • (bool) $ziparchive Whether to use ZipArchive. Default true.
    Required:
定義位置
相關勾子
pre_user_searchprofile_updatewp_inline_script_attributes
相關方法
_unzip_file_ziparchive_unzip_file_pclzipis_archiveunzip_fileis_archivedupdate_archived
引入
3.0.0
棄用
-

“unzip_file_use_ziparchive”是一個過濾器鉤子,允許開發人員更改 unzip_file 函式的行為,該函式用於從 ZIP 存檔中提取檔案。 當此過濾器返回 false 時,unzip_file 函式將使用 PclZip 庫來提取檔案,而不是 ZipArchive 擴充套件。

過濾是否使用 ZipArchive 來解壓縮檔案。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {
if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {
if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) {

常見問題

FAQs
檢視更多 >