On this page
function menu_load_all
menu_load_all()
Load all custom menu data.
Return value
Array of custom menu data.
File
- modules/menu/menu.module, line 230
- Allows administrators to customize the site's navigation menus.
Code
function menu_load_all() {
$custom_menus = &drupal_static(__FUNCTION__);
if (!isset($custom_menus)) {
if ($cached = cache_get('menu_custom', 'cache_menu')) {
$custom_menus = $cached->data;
}
else {
$custom_menus = db_query('SELECT * FROM {menu_custom}')->fetchAllAssoc('menu_name', PDO::FETCH_ASSOC);
cache_set('menu_custom', $custom_menus, 'cache_menu');
}
}
return $custom_menus;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!menu!menu.module/function/menu_load_all/7.x