1 views_handler_field_node_new_comments.inc | views_handler_field_node_new_comments::render_link($data, $values) |
File
- core/
modules/ comment/ views/ views_handler_field_node_new_comments.inc, line 91 - Definition of views_handler_field_node_new_comments.
Class
- views_handler_field_node_new_comments
- Field handler to display the number of new comments.
Code
function render_link($data, $values) {
if (!empty($this->options['link_to_comment']) && $data !== NULL && $data !== '') {
$node = new Node();
$node->nid = $this->get_value($values, 'nid');
$node->type = $this->get_value($values, 'type');
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = 'node/' . $node->nid;
$this->options['alter']['query'] = comment_new_page_count($this->get_value($values, 'comment_count'), $this->get_value($values), $node);
$this->options['alter']['fragment'] = 'new';
}
return $data;
}