You are here

function menu_views_theme_registry_alter in Menu Views 7.2

Same name and namespace in other branches
  1. 8.3 menu_views.module \menu_views_theme_registry_alter()
  2. 7 menu_views.module \menu_views_theme_registry_alter()

Implements hook_theme_registry_alter(). Intercepts theme_menu_link().

File

./menu_views.module, line 48
Module to allow Views to be attached as menu items.

Code

function menu_views_theme_registry_alter(&$registry) {

  // Save previous value from registry in case another module/theme overwrites theme_menu_link() as well.
  $registry['menu_views_menu_link_default'] = $registry['menu_link'];
  $registry['menu_link']['function'] = 'menu_views_menu_link';

  // Provide Superfish support.
  if (isset($registry['superfish_menu_item_link'])) {
    $registry['menu_views_superfish_menu_item_link_default'] = $registry['superfish_menu_item_link'];
    $registry['superfish_menu_item_link']['function'] = 'menu_views_superfish_menu_item_link';
  }

  // Provide Responsive Dropdown Menus support.
  if (isset($registry['responsive_dropdown_menus_item_link'])) {
    $registry['menu_views_responsive_dropdown_menus_item_link_default'] = $registry['responsive_dropdown_menus_item_link'];
    $registry['responsive_dropdown_menus_item_link']['function'] = 'menu_views_responsive_dropdown_menus_item_link';
  }
}