Updates a list of menus with expanded items.
function _menu_set_expanded_menus() { $names = db_query("SELECT menu_name FROM {menu_links} WHERE expanded <> 0 GROUP BY menu_name") ->fetchCol(); variable_set('menu_expanded', $names); }