function node_row_node_view_preprocess_node

Implements hook_preprocess_node().

1 call to node_row_node_view_preprocess_node()
views_preprocess_node in drupal/core/modules/views/views.module
A theme preprocess function to automatically allow view-based node templates if called from a view.

File

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

Code

function node_row_node_view_preprocess_node(&$vars) {
  $node = $vars['node'];
  $options = $vars['view']->rowPlugin->options;

  // Prevent the comment form from showing up if this is not a page display.
  if ($vars['view_mode'] == 'full' && !$vars['view']->display_handler
    ->hasPath()) {
    $node->comment = FALSE;
  }
  if (!$options['links']) {
    unset($vars['content']['links']);
  }
  if (!empty($options['comments']) && user_access('access comments') && $node->comment) {
    $vars['content']['comments'] = comment_node_page_additions($node);
  }
}