function quotes_token_values in Quotes 6
Same name and namespace in other branches
- 5 quotes.module \quotes_token_values()
- 7 quotes.module \quotes_token_values()
Implementation of hook_token_values().
File
- ./
quotes.module, line 1846 - 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;
}