diff --git a/admin_menu.inc b/admin_menu.inc index 80b4253..ff12372 100644 --- a/admin_menu.inc +++ b/admin_menu.inc @@ -379,6 +379,13 @@ function admin_menu_links_menu($tree) { // Remove description to prevent mouseover tooltip clashes. unset($data['link']['localized_options']['attributes']['title']); + // Make action links (typically "Add ...") appear first in dropdowns. + // They might appear first already, but only as long as there is no link + // that comes alphabetically first (e.g., a node type with label "Ad"). + if ($data['link']['type'] & MENU_IS_LOCAL_ACTION) { + $data['link']['weight'] -= 1000; + } + $links[$data['link']['href']] = array( '#title' => $data['link']['title'], '#href' => $data['link']['href'],