You are here

function responsive_menu_preprocess_block in Responsive and off-canvas menu 4.3.x

Same name and namespace in other branches
  1. 8.3 responsive_menu.module \responsive_menu_preprocess_block()
  2. 8.2 responsive_menu.module \responsive_menu_preprocess_block()
  3. 7.3 responsive_menu.module \responsive_menu_preprocess_block()
  4. 7 responsive_menu.module \responsive_menu_preprocess_block()
  5. 7.2 responsive_menu.module \responsive_menu_preprocess_block()
  6. 4.4.x responsive_menu.module \responsive_menu_preprocess_block()
  7. 4.0.x responsive_menu.module \responsive_menu_preprocess_block()
  8. 4.1.x responsive_menu.module \responsive_menu_preprocess_block()

Implements hook_preprocess_block().

Removes the contextual links from the toggle icon block.

File

./responsive_menu.module, line 75
Contains procedural code.

Code

function responsive_menu_preprocess_block(&$variables) {
  if ($variables['plugin_id'] == 'responsive_menu_toggle') {
    $variables['attributes']['class'][] = 'responsive-menu-toggle-wrapper';
    $variables['attributes']['class'][] = 'responsive-menu-toggle';

    // Remove the contextual links from this block.
    unset($variables['title_suffix']['contextual_links']);
  }
}