You are here

function tokenSTARTER_token_list in Token 6

Implementation of hook_token_list().

File

./tokenSTARTER.module, line 18
The Token API module.

Code

function tokenSTARTER_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'global' || $type == 'all') {
    $tokens['global']['random-sha1'] = t("A randomly generated SHA1 hash.");
    $tokens['global']['site-date-timestamp'] = t('The current timestamp in seconds past January 1, 1970.');
    $tokens['global']['random-num-1'] = t('A randomly generated single-digit number.');
    $tokens['global']['random-num-3'] = t('A randomly generated three-digit number.');
    $tokens['global']['random-num-10'] = t('A randomly generated ten-digit number.');
    $tokens['global']['random-alpha-1'] = t('Randomly generated single-digit letter.');
    $tokens['global']['random-alpha-3'] = t('Randomly generated three-digit letters.');
    $tokens['global']['random-alpha-10'] = t('Randomly generated ten-digit letters.');
  }
  if ($type == 'node' || $type == 'all') {

    // Node tokens here.
  }
  return $tokens;
}