6.x menu.inc _menu_set_expanded_menus()
7.x menu.inc _menu_set_expanded_menus()

Helper function to update a list of menus with expanded items

Related topics

1 call to _menu_set_expanded_menus()
_menu_clear_page_cache in includes/menu.inc
Helper function to clear the page and block caches at most twice per page load.


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


function _menu_set_expanded_menus() {
  $names = array();
  $result = db_query("SELECT menu_name FROM {menu_links} WHERE expanded != 0 GROUP BY menu_name");
  while ($n = db_fetch_array($result)) {
    $names[] = $n['menu_name'];
  variable_set('menu_expanded', $names);