You are here

function ultimenu_page_bottom in Ultimenu 8.2

Same name and namespace in other branches
  1. 8 ultimenu.module \ultimenu_page_bottom()

Implements hook_page_bottom().

File

./ultimenu.module, line 108
Build Ultimenu blocks based on menu, and their regions on enabled menu items.

Code

function ultimenu_page_bottom(array &$page_bottom) {
  if (_ultimenu_is_applicable()) {
    $label = t('Menu');
    $button = '<button data-ultimenu-button="#ultimenu-main" class="button button--ultimenu"
      aria-label="' . $label . '" value="' . $label . '"><span class="bars">' . $label . '</span></button>';
    $page_bottom['ultimenu_button']['#markup'] = $button;
    $page_bottom['ultimenu_button']['#allowed_tags'] = [
      'button',
      'span',
    ];
  }
}