function bartik_preprocess_node
Same name in other branches
- 7.x themes/bartik/template.php \bartik_preprocess_node()
- 9 core/themes/bartik/bartik.theme \bartik_preprocess_node()
Implements hook_preprocess_HOOK() for node.html.twig.
File
-
core/
themes/ bartik/ bartik.theme, line 80
Code
function bartik_preprocess_node(&$variables) {
// Remove the "Add new comment" link on teasers or when the comment form is
// displayed on the page.
if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
unset($variables['content']['links']['comment']['#links']['comment-add']);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.