array('toolbar' => $settings)), 'setting'); } /** * Implementation of hook_admin_menu_output_alter(). */ function admin_menu_toolbar_admin_menu_output_alter(&$content) { // Add a class to top-level items for styling. foreach (element_children($content['menu']) as $link) { $content['menu'][$link]['#attributes']['class'][] = 'admin-menu-toolbar-category'; } // Alter user account link. $content['user']['account']['#title'] = t('Hello @username', array('@username' => $content['user']['account']['#title'])); $content['user']['account']['#options']['html'] = TRUE; // Add shortcuts menu. $content['shortcuts'] = array( '#theme' => 'admin_menu_links', '#weight' => -200, ); $content['shortcuts']['shortcuts'] = array( '#title' => t('Show shortcuts'), // @todo How do we want to trigger/store state? '#attributes' => array('class' => array('admin-menu-shortcuts')), //'#attributes' => array('class' => array('admin-menu-shortcuts', 'admin-menu-shortcuts-active')), '#options' => array( 'attributes' => array('class' => 'toggle'), ), ); // @todo *Move* this from $content['menu'] instead. $content['shortcuts']['shortcuts']['node-add'] = array( '#title' => t('Add content'), '#href' => 'node/add', ); $content['shortcuts']['shortcuts']['admin-content-node'] = array( '#title' => t('Find content'), '#href' => 'admin/content/node', '#access' => user_access('administer nodes'), ); }