_menu_set_expanded_menus

Versions
6 – 7
_menu_set_expanded_menus()

Helper function to update a list of menus with expanded items

Related topics

▾ 1 function calls _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.

Code

includes/menu.inc, line 2056

<?php
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);
}
?>
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.