function admin_menu_links_menu

cis7 admin_menu_links_menu($tree)
cle7 admin_menu_links_menu($tree)
elmsmedia7 admin_menu_links_menu($tree)
icor7 admin_menu_links_menu($tree)
meedjum_blog7 admin_menu_links_menu($tree)
mooc7 admin_menu_links_menu($tree)

Build the administration menu as renderable menu links.


$tree: A data structure representing the administration menu tree as returned from menu_tree_all_data().

Return value

The complete administration menu, suitable for theme_admin_menu_links().

See also



3 calls to admin_menu_links_menu()
admin_menu_admin_menu_output_build in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_admin_menu_output_build().
admin_menu_links_icon in sites/all/modules/ulmus/admin_menu/
Build icon menu links; mostly containing maintenance helpers.
admin_menu_output in sites/all/modules/ulmus/admin_menu/admin_menu.module
Build the administration menu output.


sites/all/modules/ulmus/admin_menu/, line 360
Menu builder functions for Administration menu.


function admin_menu_links_menu($tree) {
  $links = array();
  foreach ($tree as $data) {
    // Skip items that are inaccessible, invisible, or link to their parent.
    // (MENU_DEFAULT_LOCAL_TASK), and MENU_CALLBACK-alike items that should only
    // appear in the breadcrumb.
    if (!$data['link']['access'] || $data['link']['type'] & MENU_LINKS_TO_PARENT || $data['link']['type'] == MENU_VISIBLE_IN_BREADCRUMB || $data['link']['hidden'] == 1) {
    // Hide 'Administer' and make child links appear on this level.
    // @todo Make this configurable.
    if ($data['link']['router_path'] == 'admin') {
      if ($data['below']) {
        $links = array_merge($links, admin_menu_links_menu($data['below']));
    // Omit alias lookups.
    $data['link']['localized_options']['alias'] = TRUE;
    // Remove description to prevent mouseover tooltip clashes.

    // 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'],
      '#options' => $data['link']['localized_options'],
      '#weight' => $data['link']['weight'],

    // Recurse to add any child links.
    $children = array();
    if ($data['below']) {
      $children = admin_menu_links_menu($data['below']);
      $links[$data['link']['href']] += $children;

    // Handle links pointing to category/overview pages.
    if ($data['link']['page_callback'] == 'system_admin_menu_block_page' || $data['link']['page_callback'] == 'system_admin_config_page') {
      // Apply a marker for others to consume.
      $links[$data['link']['href']]['#is_category'] = TRUE;
      // Automatically hide empty categories.
      // Check for empty children first for performance. Only when non-empty
      // (typically 'admin/config'), check whether children are accessible.
      if (empty($children) || !element_get_visible_children($children)) {
        $links[$data['link']['href']]['#access'] = FALSE;
  return $links;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.