function talk_token_values in Talk 7
Same name and namespace in other branches
- 6 talk.module \talk_token_values()
Implements hook_token_values().
File
- ./
talk.module, line 357 - Comments are displayed in a separate 'talk' tab, for node types you wish
Code
function talk_token_values($type, $object = NULL, $options = array()) {
switch ($type) {
case 'comment':
if ($comment = (object) $object) {
$talk = '';
$node = node_load($comment->nid);
if (talk_activated($node->type)) {
$talk = '/talk';
}
$values['comment-talk-url'] = url('node/' . $comment->nid . $talk, array(
'fragment' => 'comment-' . $comment->cid,
'absolute' => TRUE,
));
return $values;
}
break;
}
}