Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function menu_block_info

Implements hook_block_info().

File

modules/menu/menu.module, line 492

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.