'; $ie_header .= ''; $ie_header .= ''; drupal_set_html_head($ie_header); return $items; } /** * Implementation of hook_footer(). * * Admin menu was previously output via hook_block(), but suffered from * theme-specific stylesheets that may be applied to layout blocks. We now * output Admin menu in the footer to circumvent this. */ function admin_menu_footer($main) { if (!user_access('access administration menu')) { return; } global $user, $locale; $cid = $user->uid .':'. $locale .':admin_menu'; $cache = cache_get($cid, 'cache_menu'); if ($cache) { $admin_menu = $cache->data; } else { require_once(drupal_get_path('module', 'admin_menu') .'/admin_menu.inc'); $admin_menu = admin_menu_get_menu(); cache_set($cid, 'cache_menu', $admin_menu, time() + (60 * 60 * 24)); } $content = '
'; $content .= theme('admin_menu_icon'); $content .= $admin_menu; $content .= '
'; return $content; } /** * Render an icon to display in the Administration Menu. * * @ingroup themeable */ function theme_admin_menu_icon() { $output = ''; return $output; } /** * Implementation of hook_form_alter() to extend devel.module. */ function admin_menu_form_alter($form_id, &$form) { if ($form_id == 'devel_admin_settings') { // shift system_settings_form buttons $weight = $form['buttons']['#weight']; $form['buttons']['#weight'] = $weight + 1; $form['admin_menu'] = array( '#type' => 'fieldset', '#title' => t('Administration Menu settings'), '#collapsible' => true, '#collapsed' => true, ); $form['admin_menu']['admin_menu_show_item_ids'] = array( '#type' => 'checkbox', '#title' => t('Display menu item IDs in Drupal Administration Menu'), '#default_value' => variable_get('admin_menu_show_item_ids', 0), '#description' => t('If enabled, the corresponding menu item id will appear next to each menu item link.'), ); $form['admin_menu']['admin_menu_show_all'] = array( '#type' => 'checkbox', '#title' => t('Display all menu items'), '#default_value' => variable_get('admin_menu_show_all', 0), '#description' => t('Enable this option to disable user access checks for menu items, i.e. every menu item in the visible menu tree will be displayed to every user regardless of access permissions.'), ); } }