Skip to content

Instantly share code, notes, and snippets.

@rimian
Created August 1, 2011 03:56
Show Gist options
  • Save rimian/1117549 to your computer and use it in GitHub Desktop.
Save rimian/1117549 to your computer and use it in GitHub Desktop.
Menus patch
diff --git modules/menu/menu.install modules/menu/menu.install
index 717c5e7..fa8d21b 100644
--- modules/menu/menu.install
+++ modules/menu/menu.install
@@ -42,17 +42,25 @@ function menu_schema() {
/**
* Implements hook_install().
+ *
+ * This has been patched because there is no real way of modifying this afterwards.
*/
function menu_install() {
- $system_menus = menu_list_system_menus();
+ $menus = menu_list_system_menus();
+
+ $menus['product-menu'] = 'Product menu';
+ // Unfortunately, 'main-menu' is hard coded in various places throughout the core. We can only change the human name.
+ $menus['main-menu'] = 'Action menu';
+
$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.'),
+ 'main-menu' => $t('The <em>Action</em> menu describes top level actionable links.'),
+ 'product-menu' => $t('The <em>Product</em> menu describes top level product links.'),
);
- foreach ($system_menus as $menu_name => $title) {
+ foreach ($menus as $menu_name => $title) {
$menu = array(
'menu_name' => $menu_name,
'title' => $t($title),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment