function comment_token_list in Token 5
Same name and namespace in other branches
- 6 token_comment.inc \comment_token_list()
Implementation of hook_token_list().
File
- ./
token_comment.inc, line 67 - Implementations of token module hooks for the core comment module.
Code
function comment_token_list($type = 'all') {
if ($type == 'comment' || $type == 'all') {
$tokens['comment']['comment-cid'] = t('The unique ID of the comment.');
$tokens['comment']['comment-nid'] = t('The unique ID of the node the comment was posted to.');
$tokens['comment']['comment-title'] = t('The title of the comment.');
$tokens['comment']['comment-title-raw'] = t('The title of the comment.');
$tokens['comment']['comment-body'] = t('The formatted content of the comment itself.');
$tokens['comment']['comment-body-raw'] = t('The formatted content of the comment itself.');
$tokens['comment']['comment-author-uid'] = t('The unique ID of the author of the comment.');
$tokens['comment']['comment-author-name'] = t('The name left by the comment author.');
$tokens['comment']['comment-author-name-raw'] = t('The name left by the comment author.');
$tokens['comment']['comment-author-homepage'] = t('The home page URL left by the comment author.');
$tokens['comment']['comment-author-mail'] = t('The email address left by the comment author.');
$tokens['comment']['comment-author-mail-raw'] = t('The email address left by the comment author.');
$tokens['comment'] += token_get_date_token_info(t('Comment creation'), 'comment-');
$tokens['comment']['comment-node-title'] = t('The title of the node the comment was posted to.');
$tokens['comment']['comment-node-title-raw'] = t('The title of the node the comment was posted to.');
return $tokens;
}
}