menu_install
function menu_install
menu_install()
Implements hook_install().
File
- modules/menu/menu.install, line 46
- Install, update and uninstall functions for the menu module.
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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!menu!menu.install/function/menu_install/7.x