private function action_has_callback_or_should_run_anyway($event)
{
// Event has a callback, so let's get on with it
if (false !== has_action($event['action'])) {
return true;
}
// Run the event anyway, perhaps because callbacks are added using the `all` action
if (apply_filters('a8c_cron_control_run_event_with_no_callbacks', false, $event)) {
return true;
}
// Remove or reschedule the empty event
if (false === $event['args']['schedule']) {
wp_unschedule_event($event['timestamp'], $event['action'], $event['args']['args']);
} else {
$timestamp = $event['timestamp'] + (isset($event['args']['interval']) ? $event['args']['interval'] : 0);
wp_reschedule_event($timestamp, $event['args']['schedule'], $event['action'], $event['args']['args']);
unset($timestamp);
}
return false;
}