function twitter_token_values in Twitter 6.2
Implementation of hook_token_values().
File
- ./
twitter.module, line 324
Code
function twitter_token_values($type, $object = NULL, $options = array()) {
$values = array();
switch ($type) {
case 'node':
$node = $object;
$values['url'] = url('node/' . $node->nid, array(
'absolute' => TRUE,
'alias' => TRUE,
));
$values['url-alias'] = url('node/' . $node->nid, array(
'absolute' => TRUE,
));
$values['title-80'] = truncate_utf8($node->title, 80, TRUE, TRUE);
$values['title-100'] = truncate_utf8($node->title, 100, TRUE, TRUE);
$values['title-120'] = truncate_utf8($node->title, 120, TRUE, TRUE);
}
return $values;
}