You are here

function menu_ui_preprocess_block in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/menu_ui/menu_ui.module \menu_ui_preprocess_block()

Implements hook_preprocess_HOOK() for block templates.

File

core/modules/menu_ui/menu_ui.module, line 459
Allows administrators to customize the site's navigation menus.

Code

function menu_ui_preprocess_block(&$variables) {
  if ($variables['configuration']['provider'] == 'menu_ui') {
    $variables['attributes']['role'] = 'navigation';
  }
}