summaryrefslogtreecommitdiff
path: root/modules/menu/menu.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/menu/menu.install')
-rw-r--r--modules/menu/menu.install20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/menu/menu.install b/modules/menu/menu.install
index aca5835ee..6514ef2ba 100644
--- a/modules/menu/menu.install
+++ b/modules/menu/menu.install
@@ -11,17 +11,21 @@
*/
function menu_install() {
$system_menus = menu_list_system_menus();
+ $t = get_t();
$descriptions = array(
- 'navigation' => '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' => "The <em>User menu</em> contains links related to the user's account, as well as the 'Log out' link.",
- 'management' => 'The <em>Management</em> menu contains links for content creation, structure, user management, and similar site activities.',
- 'main-menu' => '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' => '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.',
+ '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.'),
);
- $t = get_t();
- $query = db_insert('menu_custom')->fields(array('menu_name', 'title', 'description'));
foreach ($system_menus as $menu_name => $title) {
- $query->values(array('menu_name' => $menu_name, 'title' => $t($title), 'description' => $t($descriptions[$menu_name])))->execute();
+ $menu = array(
+ 'menu_name' => $menu_name,
+ 'title' => $t($title),
+ 'description' => $descriptions[$menu_name],
+ );
+ menu_save($menu);
}
}