You are here

function heartbeat_token_list in Heartbeat 6.3

Implementation of hook_token_list().

File

./heartbeat.module, line 510

Code

function heartbeat_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'boolean') {
    $tokens['boolean']['1-or-0'] = t("1 for true, 0 for false");
  }
  if ($type == 'rules_data_type_heartbeat_message_id') {
    $tokens['heartbeat_message']['message-id-raw'] = t("The message chosen by the user in raw");
    $tokens['heartbeat_message']['message-id'] = t("The message chosen by the user");
  }
  if ($type == 'rules_data_type_heartbeat_access') {
    $tokens['heartbeat_message']['message-access'] = t("The message access chosen by user");
  }
  if ($type == 'heartbeat_message') {
    $tokens['heartbeat']['heartbeat-message-raw'] = t("The logged heartbeat message in raw format");
  }
  if ($type == 'node') {
    $tokens['node']['title-link'] = t("The node's title with a link to it");
    $tokens['node']['author-name-url'] = t("The users name with a link to it");
  }
  if ($type == 'user') {
    $tokens['user']['user-name-url'] = t("The currently logged-in username with a link to it");
    $tokens['user']['user-profile-url'] = t("The currently logged-in username with a link to his/her profile page. <strong>USE ONLY when url-path is set to profile/username </strong>");
  }
  return $tokens;
}