function stable_preprocess_links

Same name in other branches
  1. 8.9.x core/themes/stable/stable.theme \stable_preprocess_links()

Implements template_preprocess_links().

File

core/themes/stable/stable.theme, line 29

Code

function stable_preprocess_links(&$variables) {
    if (!empty($variables['links'])) {
        foreach ($variables['links'] as $key => $value) {
            if (!is_numeric($key)) {
                $class = Html::getClass($key);
                $variables['links'][$key]['attributes']->addClass($class);
            }
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.