upgrader_pre_download

過濾鉤子
apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra )
引數
  • (bool) $reply Whether to bail without returning the package. Default false.
    Required:
  • (string) $package The package file name.
    Required:
  • (WP_Upgrader) $upgrader The WP_Upgrader instance.
    Required:
  • (array) $hook_extra Extra arguments passed to hooked filters.
    Required:
定義位置
相關勾子
upgrader_pre_installupgrader_post_installupgrader_package_optionsupgrader_source_selectionupgrader_clear_destination
相關方法
_upgrade_cron_arraycore_upgrade_preambleupgrade_network_wp_upgrade_revisions_of_post_upgrade_422_remove_genericonsparent_dropdown
引入
5.5.0
棄用
-

upgrader_pre_download:這是一個 WordPress 過濾器鉤子,允許您修改在升級過程中傳遞給升級程式的包 URL。 此鉤子允許您為升級包指定不同的 URL 或在升級過程開始之前修改現有的 URL。

過濾是否退回包。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );

常見問題

FAQs
檢視更多 >