Automattic\WP\Cron_Control\CLI\Events::delete_events PHP Method

delete_events() public method

Remove events by ID or action
public delete_events ( $args, $assoc_args )
    public function delete_events($args, $assoc_args)
    {
        // Remove a specific event
        if (isset($assoc_args['event_id'])) {
            $this->delete_event_by_id($args, $assoc_args);
            return;
        }
        // Remove all events with a given action
        if (isset($assoc_args['action'])) {
            $this->delete_event_by_action($args, $assoc_args);
            return;
        }
        \WP_CLI::error(__('Specify something to delete, or see the `cron-control-fixers` command to remove all data.', 'automattic-cron-control'));
    }