function admin_menu_toolbar_admin_menu_output_alter

nittany7 admin_menu_toolbar.module admin_menu_toolbar_admin_menu_output_alter(&$content)
cis7 admin_menu_toolbar.module admin_menu_toolbar_admin_menu_output_alter(&$content)
mooc7 admin_menu_toolbar.module admin_menu_toolbar_admin_menu_output_alter(&$content)

Implements hook_admin_menu_output_alter().

File

modules/contrib/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module, line 97
Renders Administration menu like Toolbar (core) module.

Code

function admin_menu_toolbar_admin_menu_output_alter(&$content) {
  // Add a class to top-level items for styling.
  if (isset($content['menu'])) {
    foreach (element_children($content['menu']) as $link) {
      $content['menu'][$link]['#attributes']['class'][] = 'admin-menu-toolbar-category';
    }
  }

  // Alter icon.
  if (isset($content['icon'])) {
    unset($content['icon']['icon']['#theme']);
    $content['icon']['icon']['#title'] = '<span>' . t('Home') . '</span>';
    $content['icon']['icon']['#attributes']['class'][] = 'admin-menu-toolbar-category';
  }

  // Alter user account link.
  if (isset($content['account'])) {
    $content['account']['account']['#title'] = t('Hello <strong>@username</strong>', array('@username' => $content['account']['account']['#title']));
    $content['account']['account']['#options']['html'] = TRUE;
  }
}