pre_clear_scheduled_hook

过滤钩子
apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error )
参数
  • (null|int|false|WP_Error) $pre Value to return instead. Default null to continue unscheduling the event.
    Required:
  • (string) $hook Action hook, the execution of which will be unscheduled.
    Required:
  • (array) $args Arguments to pass to the hook's callback function.
    Required:
  • (bool) $wp_error Whether to return a WP_Error on failure.
    Required:
定义位置
相关勾子
pre_unschedule_hookpre_get_scheduled_eventpre_reschedule_eventpre_schedule_eventpre_unschedule_event
相关方法
wp_clear_scheduled_hookwp_unschedule_hookwp_next_scheduledwp_get_schedulewp_get_scheduled_event_deprecated_hook
引入
5.7.0
弃用
-

pre_clear_scheduled_hook: 这是WordPress中的一个过滤钩子,允许你修改用于在执行预定钩子之前清除它的参数。这个钩子在指定的钩子被清除之前被触发,允许你修改或取消清除过程。

过滤以preflight或劫机清除预定的钩子.

返回非空值将缩短正常的非计划过程,导致函数返回过滤后的值.

对于替换wp-cron的插件,如果取消计划一个或多个事件失败,则返回成功未计划的事件数(如果没有向钩子注册事件,则返回零)或false或WP_Error.

$pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-01-29 16:09:51

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: