pre_reschedule_event

FILTER wp-includes\cron.php (ligne 402) github
Filter to override rescheduling of a recurring event. Returning a non-null value will short-circuit the normal rescheduling process, causing the function to return the filtered value instead. For plugins replacing wp-cron, return true if the event was successfully rescheduled, false or a WP_Error if not.

Paramètres

Entrée :
null, $event, $wp_error
Sortie :
@param null|bool|WP_Error $pre      Value to return instead. Default null to continue adding the event.
@param object             $event    {
@param bool               $wp_error Whether to return a WP_Error on failure.

Utilisation

// Modifier la valeur avec le filtre 'pre_reschedule_event'
add_filter('pre_reschedule_event', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...