You are here

function privatemsg_field_extra_fields in Privatemsg 7

Same name and namespace in other branches
  1. 7.2 privatemsg.module \privatemsg_field_extra_fields()

Implements hook_field_extra_fields().

File

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

Code

function privatemsg_field_extra_fields() {
  $extra['user']['user'] = array(
    'form' => array(
      'privatemsg' => array(
        'label' => 'Private msg',
        'description' => t('Private messages'),
        'weight' => 5,
      ),
    ),
    'display' => array(
      'privatemsg_send_new_message' => array(
        'label' => 'Private msg',
        'description' => t('Private messages'),
        'weight' => 5,
      ),
    ),
  );
  $extra['privatemsg_message']['privatemsg_message'] = array(
    'form' => array(
      'recipient' => array(
        'label' => t('To'),
        'description' => t('Recipient field'),
        'weight' => -10,
      ),
      'subject' => array(
        'label' => t('Message subject'),
        'description' => t('Message subject'),
        'weight' => -5,
      ),
      'body' => array(
        'label' => t('Message body'),
        'description' => t('Message body'),
        'weight' => -3,
      ),
      'token' => array(
        'label' => t('Token browser'),
        'description' => t('Displays usable tokens in a table for those who are allowed to use tokens in private messages.'),
        'weight' => -1,
      ),
    ),
    'display' => array(
      'body' => array(
        'label' => t('Message body'),
        'description' => t('Message body'),
        'weight' => -4,
      ),
    ),
  );
  return $extra;
}