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.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error );
$pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error );
$pre = apply_filters( 'pre_clear_scheduled_hook', null, $hook, $args, $wp_error );

常見問題

FAQs
檢視更多 >