function seven_preprocess_menu_local_action in Drupal 9
Same name and namespace in other branches
- 8 core/themes/seven/seven.theme \seven_preprocess_menu_local_action()
Implements hook_preprocess_HOOK() for menu-local-action templates.
File
- core/
themes/ seven/ seven.theme, line 118 - Functions to support theming in the Seven theme.
Code
function seven_preprocess_menu_local_action(array &$variables) {
$variables['link']['#options']['attributes']['class'][] = 'button--primary';
$variables['link']['#options']['attributes']['class'][] = 'button--small';
// We require Modernizr's touch test for button styling.
$variables['#attached']['library'][] = 'core/modernizr';
}