You are here

function heartbeat_comments_token_info in Heartbeat 7

Implements hook_token_info().

File

modules/heartbeat_comments/heartbeat_comments.module, line 169
Heartbeat comments for activity.

Code

function heartbeat_comments_token_info() {
  $type = array(
    'name' => t('Heartbeat activity comment'),
    'description' => t('Tokens related to individual heartbeat activity comments and their message.'),
    'needs-data' => 'heartbeat_comment',
  );

  // Core tokens for nodes.
  $heartbeat_comment['heartbeat-comment-id'] = array(
    'name' => t('ID of the heartbeat comment or node comment'),
    'description' => t('ID of the heartbeat comment or node comment'),
  );
  $heartbeat_comment['heartbeat-comment-body'] = array(
    'name' => t('Body of the heartbeat comment or node comment'),
    'description' => t('Body of the heartbeat comment or node comment'),
  );
  $heartbeat_comment['heartbeat-comment-body-raw'] = array(
    'name' => t('Body of the heartbeat comment or node comment. WARNING - raw user input'),
    'description' => t('Body of the heartbeat comment or node comment. WARNING - raw user input'),
  );
  $heartbeat_comment['heartbeat-comment-author-uid'] = array(
    'name' => t("Comment author's user id"),
    'description' => t("Comment author's user id"),
  );
  $heartbeat_comment['heartbeat-comment-date'] = array(
    'name' => t("Comment creation year (four digit)"),
    'description' => t("Comment creation year (four digit)"),
  );
  $heartbeat_comment['heartbeat-comment-uaid'] = array(
    'name' => t("Parent activity message ID"),
    'description' => t("Parent activity message ID"),
  );
  $heartbeat_comment['heartbeat-message'] = array(
    'name' => t("Parent activity message"),
    'description' => t("Parent activity message"),
  );
  $heartbeat_comment['heartbeat-message-raw'] = array(
    'name' => t("Parent activity message in raw format"),
    'description' => t("Parent activity message in raw format"),
  );
  $heartbeat_comment['heartbeat-message-url'] = array(
    'name' => t("Absolute url to the parent activity message"),
    'description' => t("Absolute url to the parent activity message"),
  );
  $heartbeat_comment['heartbeat-message-link'] = array(
    'name' => t("Link to the parent activity message, the title is the moment it occurred"),
    'description' => t("Link to the parent activity message, the title is the moment it occurred"),
  );
  return array(
    'types' => array(
      'heartbeat_comment' => $type,
    ),
    'tokens' => array(
      'heartbeat_comment' => $heartbeat_comment,
    ),
  );
}