function views_preprocess_comment

cis7 views.module views_preprocess_comment(&$vars)
cle7 views.module views_preprocess_comment(&$vars)
elmsmedia7 views.module views_preprocess_comment(&$vars)
icor7 views.module views_preprocess_comment(&$vars)
meedjum_blog7 views.module views_preprocess_comment(&$vars)
mooc7 views.module views_preprocess_comment(&$vars)

A theme preprocess function to automatically allow view-based node templates if called from a view.

File

sites/all/modules/ulmus/views/views.module, line 325
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_preprocess_comment(&$vars) {
  // The 'view' attribute of the node is added in template_preprocess_views_view_row_comment()
  if (!empty($vars['node']->view) && !empty($vars['node']->view->name)) {
    $vars['view'] = &$vars['node']->view;
    $vars['theme_hook_suggestions'][] = 'comment__view__' . $vars['node']->view->name;
    if (!empty($vars['node']->view->current_display)) {
      $vars['theme_hook_suggestions'][] = 'comment__view__' . $vars['node']->view->name . '__' . $vars['node']->view->current_display;
    }
  }
}