upgrader_source_selection

过滤钩子
apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] )
参数
  • (string) $source File source location.
    Required:
  • (string) $remote_source Remote file source location.
    Required:
  • (WP_Upgrader) $upgrader WP_Upgrader instance.
    Required:
  • (array) $hook_extra Extra arguments passed to hooked filters.
    Required:
定义位置
相关勾子
upgrader_package_optionsupgrader_process_completeupgrader_clear_destinationupgrader_pre_installupgrader_pre_download
相关方法
upload_space_setting_upgrade_422_remove_genericons_mce_set_directionwp_destroy_current_sessionrender_block_core_term_descriptionwp_schedule_https_detection
引入
4.4.0
弃用
-

“upgrader_source_selection”是一个 WordPress 过滤器钩子,允许您修改升级源。 此钩子可用于切换到替代源以进行升级,例如自定义存储库或本地文件系统。

过滤升级包的源文件位置。

$source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );

常见问题

FAQs
查看更多 >