You are here

function quotes_token_values in Quotes 5

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

Implementation of hook_token_values().

File

./quotes.module, line 2030

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;
}