wp_reschedule_event [ WordPress Function ]
wp_reschedule_event ( $timestamp, $recurrence, $hook, $args = array() )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_schedule_event, wp_unschedule_event, wp_scheduled_delete, wp_schedule_single_event, wp_get_schedule
Reschedule a recurring event.
Source
<?php
function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) {
$crons = _get_cron_array();
$schedules = wp_get_schedules();
$key = md5(serialize($args));
$interval = 0;
// First we try to get it from the schedule
if ( 0 == $interval )
$interval = $schedules[$recurrence]['interval'];
// Now we try to get it from the saved interval in case the schedule disappears
if ( 0 == $interval )
$interval = $crons[$timestamp][$hook][$key]['interval'];
// Now we assume something is wrong and fail to schedule
if ( 0 == $interval )
return false;
$now = time();
if ( $timestamp >= $now )
$timestamp = $now + $interval;
else
$timestamp = $now + ($interval - (($now - $timestamp) % $interval));
wp_schedule_event( $timestamp, $recurrence, $hook, $args );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/wp reschedule event « WordPress Codex
Description. This function is used internally by WordPress to reschedule a recurring event. You'll likely never need to use this function manually, it is documented ...
codex.wordpress.org - #17957 (wp_reschedule_event & daylight saving) – WordPress Trac
When a recurring event is established using the WP cron functions the function takes a Unix timestamp and a recurrence interval. In the situation where daylight ...
core.trac.wordpress.org - Docs for page cron.php
bool|null wp_reschedule_event (int $timestamp, string $recurrence, string $hook, [array $args = array()]). int $timestamp: Timestamp for when to run the event.
phpdoc.wordpress.org - Docs for page functions.wp-cron.php
bool|null wp_reschedule_event (int $timestamp, string $recurrence, string $hook, [array $args = array()]). int $timestamp: Timestamp for when to run the event.
phpdoc.ftwr.co.uk