function _menu_set_expanded_menus

You are here

7 menu.inc _menu_set_expanded_menus()
6 menu.inc _menu_set_expanded_menus()
8 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.
1 string reference 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.

File

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

Code

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);
}