1 node.views.inc node_row_node_view_preprocess_node(&$variables)

Implements hook_preprocess_node().

File

core/modules/node/views/node.views.inc, line 746
Provide views data and handlers for node.module.

Code

function node_row_node_view_preprocess_node(&$variables) {
  $node = $variables['node'];
  $options = $variables['view']->style_plugin->row_plugin->options;

  // Prevent the comment form from showing up if this is not a page display.
  if ($variables['view_mode'] == 'full' && !$variables['view']->display_handler->has_path()) {
    $node->comment = FALSE;
  }

  if (!$options['title']) {
    unset($variables['title']);
  }

  if (!$options['links']) {
    unset($variables['content']['links']);
  }

  if (!empty($options['comments']) && user_access('access comments') && $node->comment) {
    $variables['comments'] = comment_node_page_additions($node);
  }
}