You are here

function bartik_preprocess_node in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/themes/bartik/bartik.theme \bartik_preprocess_node()

Implements hook_preprocess_HOOK() for node.html.twig.

File

core/themes/bartik/bartik.theme, line 79
Functions to support theming in the Bartik theme.

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']);
  }
}