function privatemsg_privatemsg_thread_operations

1 privatemsg.module privatemsg_privatemsg_thread_operations()
7-1 privatemsg.module privatemsg_privatemsg_thread_operations()
7-2 privatemsg.module privatemsg_privatemsg_thread_operations()
6-2 privatemsg.module privatemsg_privatemsg_thread_operations()

Implements hook_privatemsg_thread_operations().

File

./privatemsg.module, line 2328
Allows users to send private messages to other users.

Code

function privatemsg_privatemsg_thread_operations() {
  $operations = array(
    'mark as read' => array(
      'label' => t('Mark as read'),
      'callback' => 'privatemsg_thread_change_status',
      'callback arguments' => array('status' => PRIVATEMSG_READ),
      'undo callback' => 'privatemsg_thread_change_status',
      'undo callback arguments' => array('status' => PRIVATEMSG_UNREAD),
    ),
    'mark as unread' => array(
      'label' => t('Mark as unread'),
      'callback' => 'privatemsg_thread_change_status',
      'callback arguments' => array('status' => PRIVATEMSG_UNREAD),
      'undo callback' => 'privatemsg_thread_change_status',
      'undo callback arguments' => array('status' => PRIVATEMSG_READ),
    ),
  );
  if (privatemsg_user_access('delete privatemsg')) {
    $operations['delete'] = array(
      'label' => t('Delete'),
      'callback' => 'privatemsg_thread_change_delete',
      'callback arguments' => array('delete' => 1),
      'undo callback' => 'privatemsg_thread_change_delete',
      'undo callback arguments' => array('delete' => 0),
      'button' => TRUE,
    );
  }
  return $operations;
}