You are here

function oa_comment_node_view in OA Comment 7.2

Implements hook_node_view().

File

./oa_comment.module, line 86

Code

function oa_comment_node_view($node, $view_mode) {
  if (!empty($node->content['comments'])) {
    ctools_include('modal');
    ctools_modal_add_js();
  }
  if (!empty($node->content['links']['comment']['#links'])) {
    if (isset($node->content['links']['comment']['#links']['comment-add'])) {

      // Remove the 'Add new comment' link on nodes.
      unset($node->content['links']['comment']['#links']['comment-add']);
    }
  }
}