You are here

function taxonomy_token_list in Token 5

Same name and namespace in other branches
  1. 6 token_taxonomy.inc \taxonomy_token_list()

Implementation of hook_token_list().

File

./token_taxonomy.inc, line 44
Implementations of token module hooks for the core taxonomy module.

Code

function taxonomy_token_list($type = 'all') {
  if ($type == 'taxonomy' || $type == 'all') {
    $tokens['taxonomy']['tid'] = t('The id number of the category.');
    $tokens['taxonomy']['cat'] = t('The name of the category.');
    $tokens['taxonomy']['cat-raw'] = t('The unfiltered name of the category.');
    $tokens['taxonomy']['cat-description'] = t('The optional description of the taxonomy term.');
    $tokens['taxonomy']['vid'] = t("The id number of the category's parent vocabulary.");
    $tokens['taxonomy']['vocab'] = t("The vocabulary that the page's first category belongs to.");
    $tokens['taxonomy']['vocab-raw'] = t("The unfiltered vocabulary that the page's first category belongs to.");
    $tokens['taxonomy']['vocab-description'] = t('The optional description of the taxonomy vocabulary.');
    return $tokens;
  }
}