upgrader_clear_destination

过滤钩子
apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] )
参数
  • (true|WP_Error) $removed Whether the destination was cleared. True upon success, WP_Error on failure.
    Required:
  • (string) $local_destination The local package destination.
    Required:
  • (string) $remote_destination The remote package destination.
    Required:
  • (array) $hook_extra Extra arguments passed to hooked filters.
    Required:
定义位置
相关勾子
pre_user_descriptionupgrader_source_selectionupgrader_pre_installupgrader_package_optionsupgrader_post_install
相关方法
get_file_descriptionwp_sidebar_descriptionget_the_author_descriptionget_the_archive_descriptionget_the_posts_paginationregister_deactivation_hook
引入
2.8.0
弃用
-

upgrader_clear_destination:这是一个 WordPress 操作钩子,在清除插件或主题升级的目标目录之前触发。 此钩子允许您在升级过程开始之前执行其他操作或清理。

过滤升级器是否清除了目的地。

$removed = apply_filters( 'upgrader_clear_destination', $removed, $local_destination, $remote_destination, $args['hook_extra'] );

常见问题

FAQs
查看更多 >