wp_unschedule_event

Advertisement

Summery Summery

Unschedule a previously scheduled event.

Syntax Syntax

wp_unschedule_event( int $timestamp, string $hook, array $args = array() )

Description Description

The $timestamp and $hook parameters are required so that the event can be identified.

Parameters Parameters

$timestamp

(int) (Required) Unix timestamp (UTC) of the event.

$hook

(string) (Required) Action hook of the event.

$args

(array) (Optional) Array containing each separate argument to pass to the hook's callback function. Although not passed to a callback, these arguments are used to uniquely identify the event, so they should be the same as those used when originally scheduling the event.

Default value: array()

Return Return

(bool) True if event successfully unscheduled. False for failure.

Source Source

File: wp-includes/cron.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
5.1.0 Return value modified to boolean indicating success or failure, 'pre_unschedule_event' filter added to short-circuit the function.
2.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.