You are here

function olivero_preprocess_menu in Drupal 9

Implements hook_preprocess_HOOK().

File

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

Code

function olivero_preprocess_menu(&$variables) {
  if (isset($variables['attributes']['region'])) {
    if ($variables['attributes']['region'] === 'sidebar') {
      $variables['attributes']['class'][] = 'menu--sidebar';
    }
    unset($variables['attributes']['region']);
  }
}