1 menu.install menu_install()

Implements hook_install().

File

core/modules/menu/menu.install, line 10
Install, update and uninstall functions for the menu module.

Code

function menu_install() {
  $system_menus = menu_list_system_menus();
  $t = get_t();
  $descriptions = array(
    'main-menu' => $t('The <em>Primary navigation</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.'),
    'management' => $t('The <em>Administration</em> menu contains links for administrative tasks and content entry.'),
    'user-menu' => $t("The <em>Account</em> menu contains links related to each user's account, as well as links to 'Log in' and 'Log out'."),
  );
  foreach ($system_menus as $menu_name => $title) {
    $menu = array(
      'menu_name' => $menu_name,
      'title' => $t($title),
      'description' => $descriptions[$menu_name],
    );
    menu_save($menu);
  }
}