function claro_preprocess_menu_local_action
Same name in other branches
- 8.9.x core/themes/claro/claro.theme \claro_preprocess_menu_local_action()
- 10 core/themes/claro/claro.theme \claro_preprocess_menu_local_action()
- 11.x 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
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';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.