| Versionen | |
|---|---|
| drupal6 – drupal7 | _menu_set_expanded_menus() |
Helper function to update a list of menus with expanded items
includes/
<?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);
}
?>
Kommentare
Kommentar hinzufügen