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。

过滤是否退回包。

$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );

常见问题

FAQs
查看更多 >