wp_next_scheduled

FUNCTION wp-includes\cron.php (ligne 752) github
Filter to override retrieving a scheduled event. 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.

Paramètres

Entrée :
$hook, $args = array(
Sortie :
@param null|false|object $pre  Value to return instead. Default null to continue retrieving the event.
@param string            $hook Action hook of the event.
@param array             $args Array containing each separate argument to pass to the hook's callback function.
@param int|null  $timestamp Unix timestamp (UTC) of the event. Null to retrieve next scheduled event.
@param string $hook Action hook of the event.
@param array  $args Optional. Array containing each separate argument to pass to the hook's callback function.
@return int|false The Unix timestamp (UTC) of the next time the event will occur. False if the event doesn't exist.

Utilisation

// Utilisation de la fonction wp_next_scheduled
$result = wp_next_scheduled($hook, $args = array();

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...