task_delete

Triggered before a task deletion.

Teamwork

Input (passed by reference)

$params['ids'] array<int> Array of IDs of the tasks being deleted.
… your plugin code …

Output

Teamwork

Plugin code example

PHP

public function taskDelete($params)
{
    waLog::log(
        sprintf_wp(
            'The following tasks have been deleted: %s.',
            implode(
                ', ',
                array_map(
                    function ($id) {
                        return '#' . $id;
                    },
                    $params['ids']
                )
            )
        ),
        sprintf('tasks/plugins/%s/task_delete.log', $this->id)
    );
}