upgrader_pre_install

過濾鉤子
apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] )
引數
  • (bool|WP_Error) $response Installation response.
    Required:
  • (array) $hook_extra Extra arguments passed to hooked filters.
    Required:
定義位置
相關勾子
upgrader_post_installupgrader_pre_downloadupgrader_package_optionscore_upgrade_preambleupgrader_install_package_result
相關方法
core_upgrade_preamblewp_install_wp_upgrade_revisions_of_postupgrade_network_upgrade_422_remove_genericons_upgrade_cron_array
引入
2.8.0
棄用
-

“upgrader_pre_install”是一個 WordPress 動作鉤子,在升級開始之前觸發。 此鉤子可用於在升級前執行其他操作或檢查,例如檢查當前 WordPress 安裝是否滿足升級或備份站點的要求。

在安裝開始前過濾安裝響應。

返回一個可能被評估為WP_Error的值將有效地縮短安裝過程,而返回該值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );

常見問題

FAQs
檢視更多 >