hook_comment_view
- Versions
- 7
hook_comment_view($comment)
The comment is being viewed. This hook can be used to add additional data to the comment before theming.
Parameters
$comment Passes in the comment the action is being performed on.
Return value
Nothing.
Related topics
Code
modules/comment/comment.api.php, line 69
<?php
function hook_comment_view($comment) {
// how old is the comment
$comment->time_ago = time() - $comment->changed;
}
?>Login or register to post comments 