function menu_block_info in Drupal 7
Implements hook_block_info().
File
- modules/
menu/ menu.module, line 492 - Allows administrators to customize the site's navigation menus.
Code
function menu_block_info() {
$menus = menu_get_menus(FALSE);
$blocks = array();
foreach ($menus as $name => $title) {
$blocks[$name]['info'] = check_plain($title);
// Menu blocks can't be cached because each menu item can have
// a custom access callback. menu.inc manages its own caching.
$blocks[$name]['cache'] = DRUPAL_NO_CACHE;
}
return $blocks;
}