function claro_preprocess_menu_local_action in Drupal 8
Same name and namespace in other branches
- 9 core/themes/claro/claro.theme \claro_preprocess_menu_local_action()
Implements hook_preprocess_HOOK() for menu-local-action templates.
File
- core/
themes/ claro/ claro.theme, line 219 - Functions to support theming in the Claro theme.
Code
function claro_preprocess_menu_local_action(array &$variables) {
$variables['link']['#options']['attributes']['class'][] = 'button--primary';
$variables['attributes']['class'][] = 'local-actions__item';
$legacy_class_key = array_search('button-action', $variables['link']['#options']['attributes']['class']);
if ($legacy_class_key !== FALSE) {
$variables['link']['#options']['attributes']['class'][$legacy_class_key] = 'button--action';
}
}