1 menu.module | menu_block_info() |
Implements hook_block_info().
File
- core/
modules/ menu/ menu.module, line 495 - Allows administrators to customize the site's menus.
Code
function menu_block_info() {
$menus = menu_get_menus(FALSE);
$blocks = array();
foreach ($menus as $name => $title) {
$blocks[$name] = array(
// No need to wrap $title in t(), since these menu titles are already
// translated.
'info' => check_plain($title),
'description' => t('A list of links for the menu: %title.', array('%title' => $title)),
// Menu blocks can't be cached because each menu item can have a custom
// access callback. menu.inc manages its own caching.
'cache' => BACKDROP_NO_CACHE,
);
}
return $blocks;
}