Skip navigation
Help

menu_set_active_menu_names

7 menu.inc 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 calls to menu_set_active_menu_names()

File

drupal/includes/menu.inc, line 2210
API for the Drupal menu system.

Code

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_keys(menu_list_system_menus()));
  }
  return $active;
}