Automattic\WP\Cron_Control\Events::action_has_callback_or_should_run_anyway PHP Method

action_has_callback_or_should_run_anyway() private method

Check that an event has a callback to run, and allow the check to be overridden Empty events are, by default, skipped and removed/rescheduled
private action_has_callback_or_should_run_anyway ( $event ) : boolean
$event array Event data
return boolean
    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;
    }