schedule_event

過濾鉤子
apply_filters( 'schedule_event', $event )
引數
  • (stdClass|false) $event { An object containing an event's data, or boolean false to prevent the event from being scheduled. @type string $hook Action hook to execute when the event is run. @type int $timestamp Unix timestamp (UTC) for when to next run the event. @type string|false $schedule How often the event should subsequently recur. @type array $args Array containing each separate argument to pass to the hook's callback function. @type int $interval The interval time in seconds for the schedule. Only present for recurring events. }
    Required:
定義位置
相關勾子
pre_schedule_eventpre_reschedule_eventpre_unschedule_eventpre_get_scheduled_eventcron_reschedule_event_error
相關方法
wp_schedule_eventwp_unschedule_eventwp_reschedule_eventwp_get_scheduled_eventwp_schedule_single_eventwp_scheduled_delete
引入
3.1.0
棄用
-

schedule_event: 這個函式用於在WordPress中安排一個事件: 該函式接受引數,指定時間、頻率和事件觸發時要呼叫的函式。這可以用來安排經常性的事件,如釋出文章、傳送電子郵件或更新後設資料。

在一個事件被安排之前對其進行修改。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$event = apply_filters( 'schedule_event', $event );
$event = apply_filters( 'schedule_event', $event );
$event = apply_filters( 'schedule_event', $event );

常見問題

FAQs
檢視更多 >