/[drupal]/contributions/modules/admin_menu/admin_menu.module
ViewVC logotype

Contents of /contributions/modules/admin_menu/admin_menu.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.104 - (show annotations) (download) (as text)
Wed Nov 4 21:51:19 2009 UTC (3 weeks, 3 days ago) by sun
Branch: MAIN
CVS Tags: HEAD
Changes since 1.103: +6 -2 lines
File MIME type: text/x-php
by sun: Added separate permission to flush cashes.
1 <?php
2 // $Id: admin_menu.module,v 1.103 2009/10/29 21:28:17 sun Exp $
3
4 /**
5 * @file
6 * Render an administrative menu as a dropdown menu at the top of the window.
7 */
8
9 /**
10 * Implementation of hook_help().
11 */
12 function admin_menu_help($path, $arg) {
13 switch ($path) {
14 case 'admin/settings/admin_menu':
15 return t('The administration menu module provides a dropdown menu arranged for one- or two-click access to most administrative tasks and other common destinations (to users with the proper permissions). Use the settings below to customize the appearance of the menu.');
16
17 case 'admin/help#admin_menu':
18 $output = '';
19 $output .= '<p>' . t('The administration menu module provides a dropdown menu arranged for one- or two-click access to most administrative tasks and other common destinations (to users with the proper permissions). Administration menu also displays the number of anonymous and authenticated users, and allows modules to add their own custom menu items. Integration with the menu varies from module to module; the contributed module <a href="@drupal">Devel</a>, for instance, makes strong use of the administration menu module to provide quick access to development tools.', array('@drupal' => 'http://drupal.org/project/devel')) . '</p>';
20 $output .= '<p>' . t('The administration menu <a href="@settings">settings page</a> allows you to modify some elements of the menu\'s behavior and appearance. Since the appearance of the menu is dependent on your site theme, substantial customizations require modifications to your site\'s theme and CSS files. See the advanced module README.txt file for more information on theme and CSS customizations.', array('@settings' => url('admin/settings/admin_menu'))) . '</p>';
21 $output .= '<p>' . t('The menu items displayed in the administration menu depend upon the actual permissions of the viewer. First, the administration menu is only displayed to users in roles with the <em>Access administration menu</em> (admin_menu module) permission. Second, a user must be a member of a role with the <em>Access administration pages</em> (system module) permission to view administrative links. And, third, only currently permitted links are displayed; for example, if a user is not a member of a role with the permissions <em>Administer permissions</em> (user module) and <em>Administer users</em> (user module), the <em>User management</em> menu item is not displayed.') . '</p>';
22 return $output;
23 }
24 }
25
26 /**
27 * Implementation of hook_permission().
28 */
29 function admin_menu_permission() {
30 return array(
31 'access administration menu' => array(
32 'title' => t('Access administration menu'),
33 'description' => t('Display the administration menu at the top of each page.'),
34 ),
35 'flush caches' => array(
36 'title' => t('Flush caches'),
37 'description' => t('Access links to flush caches in the administration menu.'),
38 ),
39 'display drupal links' => array(
40 'title' => t('Display Drupal links'),
41 'description' => t('Provide Drupal.org links in the administration menu.'),
42 ),
43 );
44 }
45
46 /**
47 * Implementation of hook_theme().
48 */
49 function admin_menu_theme() {
50 return array(
51 'admin_menu_links' => array(
52 'render element' => 'elements',
53 ),
54 'admin_menu_icon' => array(
55 'variables' => array(),
56 'file' => 'admin_menu.inc',
57 ),
58 );
59 }
60
61 /**
62 * Implementation of hook_menu().
63 */
64 function admin_menu_menu() {
65 // AJAX callback.
66 // @see http://drupal.org/project/js
67 $items['js/admin_menu/cache'] = array(
68 'page callback' => 'admin_menu_js_cache',
69 'access arguments' => array('access administration menu'),
70 'type' => MENU_CALLBACK,
71 );
72 // Module settings.
73 $items['admin/config/administration'] = array(
74 'title' => 'Administration',
75 'description' => 'Administration tools.',
76 'page callback' => 'system_admin_menu_block_page',
77 'access arguments' => array('access administration pages'),
78 'file' => 'system.admin.inc',
79 'file path' => drupal_get_path('module', 'system'),
80 );
81 $items['admin/config/administration/admin_menu'] = array(
82 'title' => 'Administration menu',
83 'description' => 'Adjust administration menu settings.',
84 'page callback' => 'drupal_get_form',
85 'page arguments' => array('admin_menu_theme_settings'),
86 'access arguments' => array('administer site configuration'),
87 'file' => 'admin_menu.inc',
88 );
89 // Menu link callbacks.
90 $items['admin_menu/toggle-modules'] = array(
91 'page callback' => 'admin_menu_toggle_modules',
92 'access arguments' => array('administer site configuration'),
93 'type' => MENU_CALLBACK,
94 'file' => 'admin_menu.inc',
95 );
96 $items['admin_menu/flush-cache'] = array(
97 'page callback' => 'admin_menu_flush_cache',
98 'access arguments' => array('flush caches'),
99 'type' => MENU_CALLBACK,
100 'file' => 'admin_menu.inc',
101 );
102 return $items;
103 }
104
105 /**
106 * Implementation of hook_menu_alter().
107 */
108 function admin_menu_menu_alter(&$items) {
109 foreach ($items as $path => $item) {
110 if (!strncmp($path, 'admin/', 6) && isset($item['type'])) {
111 // To avoid namespace clashes, content-type menu items are registered
112 // on a separate path. Copy these items with the proper router path and
113 // make them visible.
114 // @todo Is there another possibility to re-assign these items to their
115 // true parent (admin/structure/types) during menu rebuild to avoid the
116 // (possibly) clashing copying?
117 if (strpos($path, 'admin/structure/node-type/') === 0) {
118 // Copy item with fixed router path.
119 $newpath = str_replace('/node-type/', '/types/', $path);
120 $items[$newpath] = $item;
121 // Use new item from here, but leave old intact to play nice with
122 // others.
123 $path = $newpath;
124 // Turn MENU_CALLBACK items into visible menu items.
125 if ($item['type'] == MENU_CALLBACK) {
126 $items[$path]['type'] = MENU_NORMAL_ITEM;
127 }
128 }
129 // Trick local tasks and actions into the visible menu tree.
130 if ($item['type'] & MENU_IS_LOCAL_TASK) {
131 $items[$path]['_visible'] = TRUE;
132 }
133 }
134 }
135
136 // Remove local tasks on 'admin'.
137 $items['admin/by-task']['_visible'] = FALSE;
138 $items['admin/by-module']['_visible'] = FALSE;
139 // Move 'Add new content' to the start of the menu.
140 $items['node/add']['weight'] = -15;
141
142 // Flush client-side caches whenever the menu is rebuilt.
143 admin_menu_flush_caches();
144 }
145
146 /**
147 * Copy a menu router item to another location.
148 *
149 * Adjusts numeric path argument references for various menu router item
150 * properties.
151 *
152 * @param $item
153 * The existing menu router item.
154 * @param $old_path
155 * The existing path of $item, f.e. 'node/add'.
156 * @param $new_path
157 * The path to copy the menu router item to, f.e. 'admin/node/add'.
158 * @return
159 * The menu router item with adjusted path argument references.
160 */
161 function admin_menu_copy_item($item, $old_path, $new_path) {
162 $offset = count(explode('/', $new_path)) - count(explode('/', $old_path));
163 if ($offset != 0) {
164 foreach (array('page arguments', 'access arguments', 'load arguments', 'title arguments') as $args) {
165 if (!empty($item[$args])) {
166 foreach ($item[$args] as $key => $value) {
167 if (is_numeric($value)) {
168 $item[$args][$key] = $value + $offset;
169 }
170 }
171 }
172 }
173 }
174 return $item;
175 }
176
177 /**
178 * Implementation of hook_init().
179 *
180 * We can't move this into admin_menu_footer(), because PHP-only based themes
181 * like chameleon load and output scripts and stylesheets in front of
182 * theme_closure(), so we ensure Admin menu's styles and scripts are loaded on
183 * all pages via hook_init().
184 */
185 function admin_menu_init() {
186 if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
187 return;
188 }
189 // Performance: Skip this entirely for AJAX requests.
190 if (strpos($_GET['q'], 'js/') === 0) {
191 return;
192 }
193 global $user, $language;
194
195 $path = drupal_get_path('module', 'admin_menu');
196 drupal_add_css($path . '/admin_menu.css', array('preprocess' => FALSE));
197 if ($user->uid == 1) {
198 drupal_add_css($path . '/admin_menu.uid1.css', array('preprocess' => FALSE));
199 }
200 // Performance: Defer execution.
201 drupal_add_js($path . '/admin_menu.js', array('defer' => TRUE));
202
203 // Destination query strings are applied via JS.
204 $settings['destination'] = drupal_http_build_query(drupal_get_destination());
205
206 // Hash for client-side HTTP/AJAX caching.
207 $cid = 'admin_menu:' . $user->uid . ':' . $language->language;
208 if (!empty($_COOKIE['has_js']) && ($hash = admin_menu_cache_get($cid))) {
209 $settings['hash'] = $hash;
210 // The base path to use for cache requests depends on whether clean URLs
211 // are enabled, whether Drupal runs in a sub-directory, and on the language
212 // system configuration. url() already provides us the proper path and also
213 // invokes potentially existing custom_url_rewrite() functions, which may
214 // add further required components to the URL to provide context. Due to
215 // those components, and since url('') returns only base_path() when clean
216 // URLs are disabled, we need to use a replacement token as path. Yuck.
217 $settings['basePath'] = url('admin_menu');
218 }
219
220 $replacements = module_invoke_all('admin_menu_replacements');
221 if (!empty($replacements)) {
222 $settings['replacements'] = $replacements;
223 }
224
225 if ($setting = variable_get('admin_menu_margin_top', 1)) {
226 $settings['margin_top'] = $setting;
227 }
228 if ($setting = variable_get('admin_menu_position_fixed', 0)) {
229 $settings['position_fixed'] = $setting;
230 }
231 if ($setting = variable_get('admin_menu_tweak_tabs', 0)) {
232 $settings['tweak_tabs'] = $setting;
233 }
234 if ($_GET['q'] == 'admin/config/modules' || strpos($_GET['q'], 'admin/config/modules/list') === 0) {
235 $settings['tweak_modules'] = variable_get('admin_menu_tweak_modules', 0);
236 }
237
238 drupal_add_js(array('admin_menu' => $settings), 'setting');
239 }
240
241 /**
242 * Suppress display of administration menu.
243 *
244 * This function should be called from within another module's page callback
245 * (preferably using module_invoke()) when the menu should not be displayed.
246 * This is useful for modules that implement popup pages or other special
247 * pages where the menu would be distracting or break the layout.
248 *
249 * @param $set
250 * Defaults to TRUE. If called before hook_footer(), the menu will not be
251 * displayed. If FALSE is passed, the suppression state is returned.
252 */
253 function admin_menu_suppress($set = TRUE) {
254 static $suppress = FALSE;
255 // drupal_add_js() must only be invoked once.
256 if (!empty($set) && $suppress === FALSE) {
257 $suppress = TRUE;
258 drupal_add_js(array('admin_menu' => array('suppress' => 1)), 'setting');
259 }
260 return $suppress;
261 }
262
263 /**
264 * Implementation of hook_page_alter().
265 */
266 function admin_menu_page_alter(&$page) {
267 $page['page_bottom']['admin_menu'] = array(
268 '#markup' => admin_menu_output(),
269 );
270 }
271
272 /**
273 * Implementation of hook_js().
274 */
275 function admin_menu_js() {
276 return array(
277 'cache' => array(
278 'callback' => 'admin_menu_js_cache',
279 'includes' => array('common', 'theme', 'unicode'),
280 'dependencies' => array('devel', 'filter', 'user'),
281 ),
282 );
283 }
284
285 /**
286 * Retrieve a client-side cache hash from cache.
287 *
288 * The hash cache is consulted more than once per request; we therefore cache
289 * the results statically to avoid multiple database requests.
290 *
291 * This should only be used for client-side cache hashes. Use cache_menu for
292 * administration menu content.
293 *
294 * @param $cid
295 * The cache ID of the data to retrieve.
296 */
297 function admin_menu_cache_get($cid) {
298 static $cache = array();
299
300 if (!variable_get('admin_menu_cache_client', TRUE)) {
301 return FALSE;
302 }
303 if (!array_key_exists($cid, $cache)) {
304 $cache[$cid] = cache_get($cid, 'cache_admin_menu');
305 if ($cache[$cid] && isset($cache[$cid]->data)) {
306 $cache[$cid] = $cache[$cid]->data;
307 }
308 }
309
310 return $cache[$cid];
311 }
312
313 /**
314 * Store a client-side cache hash in persistent cache.
315 *
316 * This should only be used for client-side cache hashes. Use cache_menu for
317 * administration menu content.
318 *
319 * @param $cid
320 * The cache ID of the data to retrieve.
321 */
322 function admin_menu_cache_set($cid, $data) {
323 if (variable_get('admin_menu_cache_client', TRUE)) {
324 cache_set($cid, $data, 'cache_admin_menu');
325 }
326 }
327
328 /**
329 * Menu callback; Output administration menu for HTTP caching via AJAX request.
330 */
331 function admin_menu_js_cache($hash = NULL) {
332 // Get the rendered menu.
333 $content = admin_menu_output();
334
335 // @todo According to http://www.mnot.net/blog/2006/05/11/browser_caching,
336 // IE will only cache the content when it is compressed.
337 // Determine if the client accepts gzipped data.
338 if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
339 if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== FALSE) {
340 $encoding = 'x-gzip';
341 }
342 elseif (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) {
343 $encoding = 'gzip';
344 }
345 // Perform gzip compression when:
346 // 1) the user agent supports gzip compression.
347 // 2) Drupal page compression is enabled. Sites may wish to perform the
348 // compression at the web server level (e.g. using mod_deflate).
349 // 3) PHP's zlib extension is loaded, but zlib compression is disabled.
350 if (isset($encoding) && variable_get('page_compression', TRUE) && extension_loaded('zlib') && zlib_get_coding_type() === FALSE) {
351 // Use Vary header to tell caches to keep separate versions of the menu
352 // based on user agent capabilities.
353 header('Vary: Accept-Encoding');
354 // Since we manually perform compression, we are also responsible to
355 // send a proper encoding header.
356 header('Content-Encoding: ' . $encoding);
357 $content = gzencode($content, 9, FORCE_GZIP);
358 }
359 }
360
361 $expires = REQUEST_TIME + (3600 * 24 * 365);
362 header('Expires: ' . gmdate(DATE_RFC1123, $expires));
363 header('Last-Modified: ' . gmdate(DATE_RFC1123, REQUEST_TIME));
364 header('Cache-Control: max-age=' . $expires);
365 header('Content-Length: ' . strlen($content));
366
367 // Suppress Devel module.
368 $GLOBALS['devel_shutdown'] = FALSE;
369 echo $content;
370 exit;
371 }
372
373 /**
374 * Implementation of hook_admin_menu_replacements().
375 */
376 function admin_menu_admin_menu_replacements() {
377 $items = array();
378 if ($user_count = admin_menu_get_user_count()) {
379 $items['.admin-menu-users a'] = $user_count;
380 }
381 return $items;
382 }
383
384 /**
385 * Return count of online anonymous/authenticated users.
386 *
387 * @see user_block(), user.module
388 */
389 function admin_menu_get_user_count() {
390 $interval = REQUEST_TIME - variable_get('user_block_seconds_online', 900);
391 $count_anon = drupal_session_count($interval, TRUE);
392 $count_auth = drupal_session_count($interval, FALSE);
393
394 return t('@count-anon / @count-auth', array('@count-anon' => $count_anon, '@count-auth' => $count_auth));
395 }
396
397 /**
398 * Build the administration menu output.
399 */
400 function admin_menu_output() {
401 if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
402 return;
403 }
404 global $user, $language;
405
406 $cache_server_enabled = variable_get('admin_menu_cache_server', TRUE);
407 $cid = 'admin_menu:' . $user->uid . ':' . $language->language;
408
409 // Do nothing at all here if the client supports client-side caching, the user
410 // has a hash, and is NOT requesting the cache update path. Consult the hash
411 // cache last, since it requires a DB request.
412 // @todo Implement a sanity-check to prevent permanent double requests; i.e.
413 // what if the client-side cache fails for any reason and performs a second
414 // request on every page?
415 if (!empty($_COOKIE['has_js']) && strpos($_GET['q'], 'js/admin_menu/cache') !== 0) {
416 if (admin_menu_cache_get($cid)) {
417 return;
418 }
419 }
420
421 // Try to load and output administration menu from server-side cache.
422 if ($cache_server_enabled) {
423 $cache = cache_get($cid, 'cache_menu');
424 if ($cache && isset($cache->data)) {
425 $content = $cache->data;
426 }
427 }
428
429 // Rebuild the output.
430 if (!isset($content)) {
431 // Add site name as CSS class for development/staging theming purposes. We
432 // leverage the cookie domain instead of HTTP_HOST to account for many (but
433 // not all) multi-domain setups (e.g. language-based sub-domains).
434 $class_site = 'admin-menu-site' . drupal_strtolower(preg_replace('/[^a-zA-Z0-9-]/', '-', $GLOBALS['cookie_domain']));
435 // @todo Always output container to harden JS-less support.
436 $content['#prefix'] = '<div id="admin-menu" class="' . $class_site . '"><div id="admin-menu-wrapper"><ul>';
437 $content['#suffix'] = '</ul></div></div>';
438
439 // Load menu builder functions.
440 module_load_include('inc', 'admin_menu');
441
442 // Add administration menu.
443 $content['menu'] = admin_menu_links_menu(menu_tree_all_data('management'));
444 $content['menu']['#theme'] = 'admin_menu_links';
445 // Ensure the menu tree is rendered between the icon and user links.
446 $content['menu']['#weight'] = 0;
447 // Do not sort the menu tree, since it is sorted already.
448 $content['menu']['#sorted'] = TRUE;
449
450 // Add menu additions.
451 $content['icon'] = admin_menu_links_icon();
452 $content['user'] = admin_menu_links_user();
453
454 // Allow modules to alter the output.
455 drupal_alter('admin_menu_output', $content);
456 $content = drupal_render($content);
457
458 // Cache the menu for this user.
459 if ($cache_server_enabled) {
460 cache_set($cid, $content, 'cache_menu');
461 }
462 }
463
464 // Store the new hash for this user.
465 if (!empty($_COOKIE['has_js'])) {
466 admin_menu_cache_set($cid, md5($content));
467 }
468
469 return $content;
470 }
471
472 /**
473 * Render a themed list of links.
474 *
475 * @param $variables
476 * - elements: A structured drupal_render()-array of links using the following
477 * keys:
478 * - #attributes: Optional array of attributes for the list item, processed
479 * via drupal_attributes().
480 * - #title: Title of the link, passed to l().
481 * - #href: Optional path of the link, passed to l(). When omitted, the
482 * element's '#title' is rendered without link.
483 * - #description: Optional alternative text for the link, passed to l().
484 * - #options: Optional alternative text for the link, passed to l().
485 * The array key of each child element itself is passed as path for l().
486 * - depth: Current recursion level; internal use only.
487 */
488 function theme_admin_menu_links($variables) {
489 static $destination;
490 $elements = $variables['elements'];
491 $depth = (isset($variables['depth']) ? $variables['depth'] : 0);
492
493 if (!isset($destination)) {
494 $destination = drupal_get_destination();
495 $destination = $destination['destination'];
496 }
497
498 $output = '';
499 $depth_child = $depth + 1;
500 foreach (element_children($elements, TRUE) as $path) {
501 // Early-return nothing if user does not have access.
502 if (isset($elements[$path]['#access']) && !$elements[$path]['#access']) {
503 continue;
504 }
505 $elements[$path] += array(
506 '#attributes' => array(),
507 '#options' => array(),
508 );
509 // Render children to determine whether this link is expandable.
510 if (isset($elements[$path]['#type']) || isset($elements[$path]['#theme'])) {
511 $elements[$path]['#admin_menu_depth'] = $depth_child;
512 $elements[$path]['#children'] = drupal_render($elements[$path]);
513 }
514 else {
515 // Inherit #sorted flag from parent item.
516 if (isset($elements['#sorted'])) {
517 $elements[$path]['#sorted'] = TRUE;
518 }
519 $elements[$path]['#children'] = theme('admin_menu_links', array('elements' => $elements[$path], 'depth' => $depth_child));
520 if (!empty($elements[$path]['#children'])) {
521 $elements[$path]['#attributes']['class'][] = 'expandable';
522 }
523 if (isset($elements[$path]['#attributes']['class'])) {
524 $elements[$path]['#attributes']['class'] = $elements[$path]['#attributes']['class'];
525 }
526 }
527
528 $link = '';
529 if (isset($elements[$path]['#href'])) {
530 // Strip destination query string from href attribute and apply a CSS class
531 // for our JavaScript behavior instead.
532 if (isset($elements[$path]['#options']['query']['destination']) && $elements[$path]['#options']['query']['destination'] == $destination) {
533 unset($elements[$path]['#options']['query']['destination']);
534 $elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination';
535 }
536
537 $link .= l($elements[$path]['#title'], $elements[$path]['#href'], $elements[$path]['#options']);
538 }
539 elseif (isset($elements[$path]['#title'])) {
540 if (!empty($elements[$path]['#options']['html'])) {
541 $title = $elements[$path]['#title'];
542 }
543 else {
544 $title = check_plain($elements[$path]['#title']);
545 }
546 if (!empty($elements[$path]['#options']['attributes'])) {
547 $link .= '<span' . drupal_attributes($elements[$path]['#options']['attributes']) . '>' . $title . '</span>';
548 }
549 else {
550 $link .= $title;
551 }
552 }
553
554 $output .= '<li' . drupal_attributes($elements[$path]['#attributes']) . '>';
555 $output .= $link . $elements[$path]['#children'];
556 $output .= '</li>';
557 }
558 // @todo #attributes probably required for UL, but already used for LI.
559 // @todo Use $element['#children'] here instead.
560 if ($output && $depth > 0) {
561 $output = "\n<ul>" . $output . '</ul>';
562 }
563 return $output;
564 }
565
566 /**
567 * Implementation of hook_translated_menu_link_alter().
568 *
569 * Here is where we make changes to links that need dynamic information such
570 * as the current page path or the number of users.
571 */
572 function admin_menu_translated_menu_link_alter(&$item, $map) {
573 global $user, $base_url;
574 static $access_all;
575
576 if ($item['menu_name'] != 'admin_menu') {
577 return;
578 }
579
580 // Check whether additional development output is enabled.
581 if (!isset($access_all)) {
582 $access_all = variable_get('admin_menu_show_all', 0) && module_exists('devel');
583 }
584 // Prepare links that would not be displayed normally.
585 if ($access_all && !$item['access']) {
586 $item['access'] = TRUE;
587 // Prepare for http://drupal.org/node/266596
588 if (!isset($item['localized_options'])) {
589 _menu_item_localize($item, $map, TRUE);
590 }
591 }
592
593 // Don't waste cycles altering items that are not visible
594 if (!$item['access']) {
595 return;
596 }
597
598 // Add developer information to all links, if enabled.
599 if ($extra = variable_get('admin_menu_display', 0)) {
600 $item['title'] .= ' ' . $extra[0] . ': ' . $item[$extra];
601 }
602 }
603
604 /**
605 * Implementation of hook_flush_caches().
606 *
607 * Flush client-side caches.
608 */
609 function admin_menu_flush_caches() {
610 // Flush cached output of admin_menu.
611 cache_clear_all('admin_menu:', 'cache_menu', TRUE);
612 // Flush client-side cache hashes.
613 // db_table_exists() required for SimpleTest.
614 if (db_table_exists('cache_admin_menu')) {
615 cache_clear_all('*', 'cache_admin_menu', TRUE);
616 }
617 }
618
619 /**
620 * Implementation of hook_form_FORM_ID_alter().
621 *
622 * Form submit handler to flush client-side cache hashes when clean URLs are toggled.
623 */
624 function admin_menu_form_system_clean_url_settings_alter(&$form, $form_state) {
625 $form['#submit'][] = 'admin_menu_flush_caches';
626 }
627
628 /**
629 * Implementation of hook_form_FORM_ID_alter().
630 *
631 * Extends Devel module with Administration menu developer settings.
632 */
633 function admin_menu_form_devel_admin_settings_alter(&$form, &$form_state) {
634 module_load_include('inc', 'admin_menu');
635 _admin_menu_form_devel_admin_settings_alter($form, $form_state);
636 }

  ViewVC Help
Powered by ViewVC 1.1.2