list_save

Triggered upon adding a personal task filter.

Teamwork

Input (passed by reference)

$params['list'] array Added filter’s properties as an array with the following keys:
$params['list']['id'] int Filter ID.
$params['list']['name'] string Filter name.
$params['list']['create_datetime'] datetime Filter adding date and time.
$params['list']['contact_id'] int ID of the user who has added the filter.
$params['list']['hash'] string Hash corresponding to the filter’s task list.
$params['list']['params'] string Task filtering parameters.
$params['list']['order'] string Selected sorting option from the list: 'priority', 'due', 'newest', 'oldest'.
$params['list']['count'] int Current number of tasks displayed by the filter at the moment of its creation.
… your plugin code …

Output

Teamwork

Plugin code example

PHP

public function listSave($params)
{
    waLog::log(
        sprintf_wp(
            'Personal task list “%s” saved for user #%d.',
            $params['list']['name'],
            $params['list']['contact_id']
        ),
        sprintf('tasks/plugins/%s/list_save.log', $this->id)
    );
}