comment_links

function comment_links

comment_links($comment, $node)

Helper function, build links for an individual comment.

Adds reply, edit, delete etc. depending on the current user permissions.

Parameters

$comment: The comment object.

$node: The node the comment is attached to.

Return value

A structured array of links.

File

modules/comment/comment.module, line 1037
Enables users to comment on published content.

Code

function comment_links($comment, $node) {
  $links = array();
  if ($node->comment == COMMENT_NODE_OPEN) {
    if (user_access('administer comments') && user_access('post comments')) {
      $links['comment-delete'] = array(
        'title' => t('delete'),
        'href