function menu_install
Implements hook_install().
File
-
modules/
menu/ menu.install, line 46
Code
function menu_install() {
$system_menus = menu_list_system_menus();
$t = get_t();
$descriptions = array(
'navigation' => $t('The <em>Navigation</em> menu contains links intended for site visitors. Links are added to the <em>Navigation</em> menu automatically by some modules.'),
'user-menu' => $t("The <em>User</em> menu contains links related to the user's account, as well as the 'Log out' link."),
'management' => $t('The <em>Management</em> menu contains links for administrative tasks.'),
'main-menu' => $t('The <em>Main</em> menu is used on many sites to show the major sections of the site, often in a top navigation bar.'),
);
foreach ($system_menus as $menu_name => $title) {
$menu = array(
'menu_name' => $menu_name,
'title' => $t($title),
'description' => $descriptions[$menu_name],
);
menu_save($menu);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.