You are here

function olivero_preprocess_menu_local_tasks in Drupal 9

Implements hook_preprocess_HOOK() for menu-local-tasks templates.

File

core/themes/olivero/olivero.theme, line 237
Functions to support theming in the Olivero theme.

Code

function olivero_preprocess_menu_local_tasks(&$variables) {
  foreach (Element::children($variables['primary']) as $key) {
    $variables['primary'][$key]['#level'] = 'primary';
  }
  foreach (Element::children($variables['secondary']) as $key) {
    $variables['secondary'][$key]['#level'] = 'secondary';
  }
}