Search

apply_filters( 'pre_unschedule_event', null|bool $pre, int $timestamp, string $hook, array $args )

Filter to preflight or hijack unscheduling of events.

Description Description

Returning a non-null value will short-circuit the normal unscheduling process, causing the function to return the filtered value instead.

For plugins replacing wp-cron, return true if the event was successfully unscheduled, false if not.


Parameters Parameters

$pre

(null|bool) Value to return instead. Default null to continue unscheduling the event.

$timestamp

(int) Timestamp for when to run the event.

$hook

(string) Action hook, the execution of which will be unscheduled.

$args

(array) Arguments to pass to the hook's callback function.


In WordPress theme and development, Hooks are functions that can be applied to an Action or a Filter in WordPress. Actions and Filters in WordPress are functions that can be altered by theme and plugin developers to change the default WordPress functionality.

Functions used to alter Actions/Filters in WordPress can be hooked into WordPress. In any case, note that actions and filters are not some thing very similar. Actions are functions performed when a specific occasion happens in WordPress. Filters enable you to change certain functions. Arguments used to hook the two filters and actions appear to be identical. Be that as it may, they are different in functionality and how they carry on.