You are here

function quotes_token_values in Quotes 7

Same name and namespace in other branches
  1. 5 quotes.module \quotes_token_values()
  2. 6 quotes.module \quotes_token_values()

Implements hook_token_values().

File

./quotes.module, line 2436
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_token_values($type, $object = NULL) {
  $values = array();
  switch ($type) {
    case 'all':
    case 'node':
      $author = empty($object->quotes_author) ? 'unspecified' : $object->quotes_author;
      $values['quotes-author'] = decode_entities(check_plain($author));
      $values['quotes-author-raw'] = $author;
      $values['quotes-author-id'] = $object->quotes_aid;
      break;
  }
  return $values;
}