function seven_preprocess_menu_local_action

Same name and namespace in other branches
  1. 8.9.x 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 117

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 the touchevents test for button styling.
    $variables['#attached']['library'][] = 'core/drupal.touchevents-test';
}

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