You are here

function shoutbox_rules_token_info in Shoutbox 7.2

Same name and namespace in other branches
  1. 7 shoutbox_rules/shoutbox_rules.tokens.inc \shoutbox_rules_token_info()

Implements hook_token_info().

File

shoutbox_rules/shoutbox_rules.tokens.inc, line 11
Provides tokens by the shoutbox_message data type.

Code

function shoutbox_rules_token_info() {
  $type = array(
    'name' => t('Shoutbox message'),
    'description' => t('Tokens related to individual shoutbox messages.'),
    'needs-data' => 'shoutbox_message',
  );
  $shoutbox_message['shoutbox-message-id'] = array(
    'name' => t('Shoutbox message ID'),
    'description' => t('Shoutbox message ID'),
  );
  $shoutbox_message['shoutbox-message-body'] = array(
    'name' => t('Body of the Shoutbox message'),
    'description' => t('Body of the Shoutbox message'),
  );
  $shoutbox_message['shoutbox-message-body-raw'] = array(
    'name' => t('Body of the Shoutbox message. WARNING - raw user input'),
    'description' => t('Body of the Shoutbox message. WARNING - raw user input'),
  );
  return array(
    'types' => array(
      'shoutbox_message' => $type,
    ),
    'tokens' => array(
      'shoutbox_message' => $shoutbox_message,
    ),
  );
}