function views_theme_suggestions_comment_alter
Same name in other branches
- 9 core/modules/views/views.module \views_theme_suggestions_comment_alter()
- 8.9.x core/modules/views/views.module \views_theme_suggestions_comment_alter()
- 10 core/modules/views/views.module \views_theme_suggestions_comment_alter()
Implements hook_theme_suggestions_HOOK_alter().
File
-
core/
modules/ views/ views.module, line 282
Code
function views_theme_suggestions_comment_alter(array &$suggestions, array $variables) {
$comment = $variables['elements']['#comment'];
if (!empty($comment->view) && $comment->view->storage
->id()) {
$suggestions[] = 'comment__view__' . $comment->view->storage
->id();
if (!empty($comment->view->current_display)) {
$suggestions[] = 'comment__view__' . $comment->view->storage
->id() . '__' . $comment->view->current_display;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.