pre_get_scheduled_event WordPress Filter Hook

The pre_get_scheduled_event WordPress hook is used to retrieve a scheduled event before it is displayed. This hook is useful for modifying the event data before it is displayed on the front-end.

apply_filters( 'pre_get_scheduled_event', null|false|object $pre, string $hook, array $args, int|null $timestamp ) #

Filter to preflight or hijack retrieving a scheduled event.


Description

Returning a non-null value will short-circuit the normal process, returning the filtered value instead.

Return false if the event does not exist, otherwise an event object should be returned.


Top ↑

Parameters

$pre

(null|false|object)Value to return instead. Default null to continue retrieving the event.

$hook

(string)Action hook of the event.

$args

(array)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.

$timestamp

(int|null)Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.


Top ↑

Source

File: wp-includes/cron.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.