function olivero_preprocess_menu_local_tasks

Same name and namespace in other branches
  1. 10 core/themes/olivero/olivero.theme \olivero_preprocess_menu_local_tasks()
  2. 11.x core/themes/olivero/olivero.theme \olivero_preprocess_menu_local_tasks()

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

File

core/themes/olivero/olivero.theme, line 237

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';
    }
}

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