menu_set_active_menu_names

Versions
7
menu_set_active_menu_names($menu_names = NULL)

Set (or get) the active menu for the current page - determines the active trail.

Related topics

▾ 2 functions call menu_set_active_menu_names()

book_page_alter in modules/book/book.module
Implements hook_page_alter().
menu_get_active_menu_names in includes/menu.inc
Get the active menu for the current page - determines the active trail.

Code

includes/menu.inc, line 1982

<?php
function menu_set_active_menu_names($menu_names = NULL) {
  $active = &drupal_static(__FUNCTION__);

  if (isset($menu_names) && is_array($menu_names)) {
    $active = $menu_names;
  }
  elseif (!isset($active)) {
    $active = variable_get('menu_default_active_menus', array('management', 'navigation', 'user-menu', 'main-menu'));
  }
  return $active;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.