function hook_privatemsg_thread_operations in Privatemsg 6.2
Same name and namespace in other branches
- 6 privatemsg.api.php \hook_privatemsg_thread_operations()
- 7.2 privatemsg.api.php \hook_privatemsg_thread_operations()
- 7 privatemsg.api.php \hook_privatemsg_thread_operations()
Expose operations/actions which can be executed on threads.
Return an array of operations to privatemsg, the key of each operation is the operation key or name.
See also
Related topics
2 functions implement hook_privatemsg_thread_operations()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- privatemsg_filter_privatemsg_thread_operations in privatemsg_filter/
privatemsg_filter.module - Implements hook_privatemsg_thread_operations().
- privatemsg_privatemsg_thread_operations in ./
privatemsg.module - Implements hook_privatemsg_thread_operations().
2 invocations of hook_privatemsg_thread_operations()
- privatemsg_list_submit in ./
privatemsg.pages.inc - Process privatemsg_list form submissions.
- _privatemsg_action_form in ./
privatemsg.pages.inc - Returns a form which handles and displays thread actions.
File
- ./
privatemsg.api.php, line 459 - Privatemsg API Documentation
Code
function hook_privatemsg_thread_operations() {
return array(
'operation key' => array(
'label' => 'Label of the operation. Only use this if the operation
should be displayed automatically in the action form',
'callback' => 'privatemsg_thread_change_status',
// Function callback that will be executed.
'callback arguments' => array(
'status' => PRIVATEMSG_READ,
),
// Additional arguments to above function
'undo callback' => 'privatemsg_thread_change_status',
// Provide a function which can "undo" the operation. Optional.
'undo callback arguments' => array(
'status' => PRIVATEMSG_UNREAD,
),
),
);
}