function theme_admin_menu_links

cis7 admin_menu.module theme_admin_menu_links($variables)
cle7 admin_menu.module theme_admin_menu_links($variables)
elmsmedia7 admin_menu.module theme_admin_menu_links($variables)
icor7 admin_menu.module theme_admin_menu_links($variables)
meedjum_blog7 admin_menu.module theme_admin_menu_links($variables)
mooc7 admin_menu.module theme_admin_menu_links($variables)

Render a themed list of links.



  • elements: A renderable array of links using the following keys:

    • #attributes: Optional array of attributes for the list item, processed via drupal_attributes().
    • #title: Title of the link, passed to l().
    • #href: Optional path of the link, passed to l(). When omitted, the element's '#title' is rendered without link.
    • #description: Optional alternative text for the link, passed to l().
    • #options: Optional alternative text for the link, passed to l().

    The array key of each child element itself is passed as path for l().

6 string references to the theme hook from theme_admin_menu_links()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

admin_menu_links_account in sites/all/modules/ulmus/admin_menu/
Builds the account links.
admin_menu_links_icon in sites/all/modules/ulmus/admin_menu/
Build icon menu links; mostly containing maintenance helpers.
admin_menu_links_search in sites/all/modules/ulmus/admin_menu/
Build search widget.
admin_menu_links_users in sites/all/modules/ulmus/admin_menu/
Builds user counter.
admin_menu_output in sites/all/modules/ulmus/admin_menu/admin_menu.module
Build the administration menu output.

... See full list


sites/all/modules/ulmus/admin_menu/admin_menu.module, line 635
Render an administrative menu as a dropdown menu at the top of the window.


function theme_admin_menu_links($variables) {
  $destination = &drupal_static('admin_menu_destination');
  $elements = $variables['elements'];

  if (!isset($destination)) {
    $destination = drupal_get_destination();
    $destination = $destination['destination'];

  // The majority of items in the menu are sorted already, but since modules
  // may add or change arbitrary items anywhere, there is no way around sorting
  // everything again. element_sort() is not sufficient here, as it
  // intentionally retains the order of elements having the same #weight,
  // whereas menu links are supposed to be ordered by #weight and #title.
  uasort($elements, 'admin_menu_element_sort');
  $elements['#sorted'] = TRUE;

  $output = '';
  foreach (element_children($elements) as $path) {
    // Early-return nothing if user does not have access.
    if (isset($elements[$path]['#access']) && !$elements[$path]['#access']) {
    $elements[$path] += array(
      '#attributes' => array(),
      '#options' => array(),
    // Render children to determine whether this link is expandable.
    if (isset($elements[$path]['#type']) || isset($elements[$path]['#theme']) || isset($elements[$path]['#pre_render'])) {
      $elements[$path]['#children'] = drupal_render($elements[$path]);
    else {
      $elements[$path]['#children'] = theme('admin_menu_links', array('elements' => $elements[$path]));
      if (!empty($elements[$path]['#children'])) {
        $elements[$path]['#attributes']['class'][] = 'expandable';
      if (isset($elements[$path]['#attributes']['class'])) {
        $elements[$path]['#attributes']['class'] = $elements[$path]['#attributes']['class'];

    $link = '';
    // Handle menu links.
    if (isset($elements[$path]['#href'])) {
      // Strip destination query string from href attribute and apply a CSS class
      // for our JavaScript behavior instead.
      if (isset($elements[$path]['#options']['query']['destination']) && $elements[$path]['#options']['query']['destination'] == $destination) {
        $elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination';

      $link = l($elements[$path]['#title'], $elements[$path]['#href'], $elements[$path]['#options']);
    // Handle plain text items, but do not interfere with menu additions.
    elseif (!isset($elements[$path]['#type']) && isset($elements[$path]['#title'])) {
      if (!empty($elements[$path]['#options']['html'])) {
        $title = $elements[$path]['#title'];
      else {
        $title = check_plain($elements[$path]['#title']);
      $attributes = '';
      if (isset($elements[$path]['#options']['attributes'])) {
        $attributes = drupal_attributes($elements[$path]['#options']['attributes']);
      $link = '<span' . $attributes . '>' . $title . '</span>';

    $output .= '<li' . drupal_attributes($elements[$path]['#attributes']) . '>';
    $output .= $link . $elements[$path]['#children'];
    $output .= '</li>';
  // @todo #attributes probably required for UL, but already used for LI.
  // @todo Use $element['#children'] here instead.
  if ($output) {
    $elements['#wrapper_attributes']['class'][] = 'dropdown';
    $attributes = drupal_attributes($elements['#wrapper_attributes']);
    $output = "\n" . '<ul' . $attributes . '>' . $output . '</ul>';
  return $output;



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.