You are here

function book_token_list in Token 6

Same name and namespace in other branches
  1. 5 token_node.inc \book_token_list()

Implements hook_token_list() on behalf of book.module.

File

./token_node.inc, line 276
Implementations of token module hooks for the core node and book modules.

Code

function book_token_list($type) {
  $tokens = array();
  if ($type == 'node' || $type == 'all') {
    $tokens['book']['book'] = t("The title of the node's book parent.");
    $tokens['book']['book-raw'] = t("The title of the node's book parent.");
    $tokens['book']['book_id'] = t("The id of the node's book parent.");
    $tokens['book']['bookpath'] = t("The titles of all parents in the node's book hierarchy.");
    $tokens['book']['bookpath-raw'] = t("The titles of all parents in the node's book hierarchy.");
  }
  return $tokens;
}