Skip to content
Snippets Groups Projects
Commit 16dc866b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #539434 by lambic, deekayen: re-order functions in menu.install.

parent fbfa7a41
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -6,36 +6,6 @@
* Install, update and uninstall functions for the menu module.
*/
/**
* Implement hook_install().
*/
function menu_install() {
$system_menus = menu_list_system_menus();
$t = get_t();
$descriptions = array(
'navigation' => $t('The <em>Navigation</em> menu contains links such as Recent posts (if the Tracker module is enabled). Non-administrative links are added to this menu by default by modules.'),
'user-menu' => $t("The <em>User menu</em> 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 content creation, structure, user management, and similar site activities.'),
'main-menu' => $t('The <em>Main menu</em> is the default source for the Main links which are often used by themes to show the major sections of a site.'),
'secondary-menu' => $t('The <em>Secondary menu</em> is the default source for the Secondary links which are often used for legal notices, contact details, and other navigation items that play a lesser role than the Main links.'),
);
foreach ($system_menus as $menu_name => $title) {
$menu = array(
'menu_name' => $menu_name,
'title' => $t($title),
'description' => $descriptions[$menu_name],
);
menu_save($menu);
}
}
/**
* Implement hook_uninstall().
*/
function menu_uninstall() {
menu_rebuild();
}
/**
* Implement hook_schema().
*/
......@@ -69,3 +39,33 @@ function menu_schema() {
return $schema;
}
/**
* Implement hook_install().
*/
function menu_install() {
$system_menus = menu_list_system_menus();
$t = get_t();
$descriptions = array(
'navigation' => $t('The <em>Navigation</em> menu contains links such as Recent posts (if the Tracker module is enabled). Non-administrative links are added to this menu by default by modules.'),
'user-menu' => $t("The <em>User menu</em> 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 content creation, structure, user management, and similar site activities.'),
'main-menu' => $t('The <em>Main menu</em> is the default source for the Main links which are often used by themes to show the major sections of a site.'),
'secondary-menu' => $t('The <em>Secondary menu</em> is the default source for the Secondary links which are often used for legal notices, contact details, and other navigation items that play a lesser role than the Main links.'),
);
foreach ($system_menus as $menu_name => $title) {
$menu = array(
'menu_name' => $menu_name,
'title' => $t($title),
'description' => $descriptions[$menu_name],
);
menu_save($menu);
}
}
/**
* Implement hook_uninstall().
*/
function menu_uninstall() {
menu_rebuild();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment