summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsun2012-01-19 13:01:52 (GMT)
committer sun2012-01-19 13:01:52 (GMT)
commitbc940587e9d8acaf316d06804f0d53b6ba5063bc (patch)
tree7d1480bc1b933da3e03dcc7a16b6830f05a5bd23
parent441f71396c8b30428f052555fa4a0aee19e61f6f (diff)
- #1097312 by sun, dalin, mstrelan, dalin: Fixed 'Tasks' and 'Index' links appear on the top-level.
-rw-r--r--admin_menu.inc4
-rw-r--r--admin_menu.module13
2 files changed, 13 insertions, 4 deletions
diff --git a/admin_menu.inc b/admin_menu.inc
index 41b45d1..964a0bf 100644
--- a/admin_menu.inc
+++ b/admin_menu.inc
@@ -383,10 +383,6 @@ function admin_menu_links_menu($tree) {
}
continue;
}
- // Remove local tasks on 'admin'.
- if (in_array($data['link']['router_path'], array('admin/by-task', 'admin/by-module'))) {
- continue;
- }
// Omit alias lookups.
$data['link']['localized_options']['alias'] = TRUE;
// Remove description to prevent mouseover tooltip clashes.
diff --git a/admin_menu.module b/admin_menu.module
index 01f6ff2..e1137b8 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -470,6 +470,19 @@ function admin_menu_admin_menu_output_build(&$content) {
}
/**
+ * Implements hook_admin_menu_output_alter().
+ */
+function admin_menu_admin_menu_output_alter(&$content) {
+ foreach ($content['menu'] as $key => $link) {
+ // Move local tasks on 'admin' into icon menu.
+ if ($link['#href'] == 'admin/tasks' || $link['#href'] == 'admin/index') {
+ $content['icon']['icon'][$key] = $link;
+ unset($content['menu'][$key]);
+ }
+ }
+}
+
+/**
* Render a themed list of links.
*
* @param $variables