diff options
-rw-r--r-- | includes/menu.inc | 8 | ||||
-rw-r--r-- | modules/menu/menu.admin.inc | 20 | ||||
-rw-r--r-- | modules/menu/menu.install | 2 | ||||
-rw-r--r-- | modules/system/system.install | 3 | ||||
-rw-r--r-- | profiles/default/default.profile | 6 |
5 files changed, 22 insertions, 17 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 2f9183657..d5707b027 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1258,7 +1258,7 @@ function menu_list_system_menus() { * Return an array of links to be rendered as the Main menu. */ function menu_main_menu() { - return menu_navigation_links(variable_get('menu_main_menu_source', 'main-menu')); + return menu_navigation_links(variable_get('menu_main_links_source', 'main-menu')); } /** @@ -1268,11 +1268,11 @@ function menu_secondary_menu() { // If the secondary menu source is set as the primary menu, we display the // second level of the primary menu. - if (variable_get('menu_secondary_menu_source', 'secondary-menu') == variable_get('menu_main_menu_source', 'main-menu')) { - return menu_navigation_links(variable_get('menu_main_menu_source', 'main-menu'), 1); + if (variable_get('menu_secondary_links_source', 'secondary-menu') == variable_get('menu_main_links_source', 'main-menu')) { + return menu_navigation_links(variable_get('menu_main_links_source', 'main-menu'), 1); } else { - return menu_navigation_links(variable_get('menu_secondary_menu_source', 'secondary-menu'), 0); + return menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-menu'), 0); } } diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index c6392b211..300229247 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -612,25 +612,25 @@ function menu_configure() { '#description' => t('Choose the menu to be the default in the menu options in the content authoring form.'), ); - $main = variable_get('menu_main_menu_source', 'main-menu'); - $main_options = array_merge($menu_options, array('' => t('No Main menu'))); - $form['menu_main_menu_source'] = array( + $main = variable_get('menu_main_links_source', 'main-menu'); + $main_options = array_merge($menu_options, array('' => t('No Main links'))); + $form['menu_main_links_source'] = array( '#type' => 'select', - '#title' => t('Source for the Main menu'), + '#title' => t('Source for the Main links'), '#default_value' => $main, '#options' => $main_options, '#tree' => FALSE, - '#description' => t('Select what should be displayed as the Main menu.'), + '#description' => t('Select what should be displayed as the Main links (typically at the top of the page).'), ); - $secondary_options = array_merge($menu_options, array('' => t('No Secondary menu'))); - $form["menu_secondary_menu_source"] = array( + $secondary_options = array_merge($menu_options, array('' => t('No Secondary links'))); + $form["menu_secondary_links_source"] = array( '#type' => 'select', - '#title' => t('Source for the Secondary menu'), - '#default_value' => variable_get('menu_secondary_menu_source', 'secondary-menu'), + '#title' => t('Source for the Secondary links'), + '#default_value' => variable_get('menu_secondary_links_source', 'secondary-menu'), '#options' => $secondary_options, '#tree' => FALSE, - '#description' => t("Select the source for the Secondary menu. An advanced option allows you to use the same source for both Main menu (currently %main) and Secondary menu: if your source menu has two levels of hierarchy, the top level menu items will appear in the Main menu, and the children of the active item will appear in the Secondary menu." , array('%main' => $main_options[$main])), + '#description' => t("Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links." , array('%main' => $main_options[$main])), ); return system_settings_form($form); diff --git a/modules/menu/menu.install b/modules/menu/menu.install index 8ecebac83..6f927c965 100644 --- a/modules/menu/menu.install +++ b/modules/menu/menu.install @@ -10,7 +10,7 @@ function menu_install() { $t = get_t(); db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'navigation', $t('Navigation'), $t('The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.')); - db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', $t('Main menu'), $t('The Main menu is often used by themes to show the major sections of a site. A typical representation of the Main menu would be tabs along the top.')); + db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'main-menu', $t('Main menu'), $t('The Main menu is often used by themes to show the major sections of a site.')); db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'secondary-menu', $t('Secondary menu'), $t('The Secondary menu is often used for pages like legal notices, contact details, and other navigation items that play a lesser role than the Main menu.')); } diff --git a/modules/system/system.install b/modules/system/system.install index 45a690198..84c7f4d8a 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3031,8 +3031,7 @@ function system_update_7008() { */ function system_update_7009() { $ret = array(); - $ret[] = update_sql("UPDATE {variable} SET name = 'menu_main_menu_source' WHERE name = 'menu_primary_links_source'"); - $ret[] = update_sql("UPDATE {variable} SET name = 'menu_main_menu_source' WHERE name = 'menu_primary_links_source'"); + $ret[] = update_sql("UPDATE {variable} SET name = 'menu_main_links_source' WHERE name = 'menu_primary_links_source'"); return $ret; } diff --git a/profiles/default/default.profile b/profiles/default/default.profile index b22cec8f5..acd0164bc 100644 --- a/profiles/default/default.profile +++ b/profiles/default/default.profile @@ -153,6 +153,12 @@ function default_profile_tasks(&$task, $url) { // Update the menu router information. menu_rebuild(); + + // Save some default links. + $link = array('link_path' => 'admin/build/menu-customize/main-menu/add', 'link_title' => 'Add a main menu link', 'menu_name' => 'main-menu'); + menu_link_save($link); + $link = array('link_path' => 'admin/build/menu-customize/secondary-menu/add', 'link_title' => 'Add a secondary menu link', 'menu_name' => 'secondary-menu'); + menu_link_save($link); } /** |