From ab08090efef1035e1611a4807cfc61fb62246b89 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Mon, 20 Sep 2010 22:47:00 +0000 Subject: [PATCH] Add some default shortcuts to the shortcut bar for the UNL profile. git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x@177 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- profiles/unl_profile/unl_profile.install | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/profiles/unl_profile/unl_profile.install b/profiles/unl_profile/unl_profile.install index 84e11647..9f93a9b4 100644 --- a/profiles/unl_profile/unl_profile.install +++ b/profiles/unl_profile/unl_profile.install @@ -56,6 +56,11 @@ function unl_profile_install() variable_set('file_temporary_path', $ini_settings['temp_dir']); } + unl_profile_add_shortcut('Related Links', 'admin/structure/block/manage/block/1/configure'); + unl_profile_add_shortcut('Footer', 'admin/structure/block/manage/block/11/configure'); + unl_profile_add_shortcut('Contact Us', 'admin/structure/block/manage/block/21/configure'); + unl_profile_add_shortcut('Navigation Links', 'admin/structure/menu/manage/main-menu'); + //TODO: IMCE setup (currently cannot be shared between sites) @@ -116,3 +121,15 @@ function unl_profile_get_default_site_db_prefix() return $databases['default']['default']['prefix']; } +function unl_profile_add_shortcut($title, $path) +{ + require_once 'modules/shortcut/shortcut.admin.inc'; + + $link = array( + 'link_title' => $title, + 'link_path' => $path + ); + $shortcut_set = shortcut_set_load('shortcut-set-1'); + shortcut_admin_add_link($link, $shortcut_set, shortcut_max_slots()); + shortcut_set_save($shortcut_set); +} -- GitLab