$menu_admin

  1. drupal
    1. 6 developer/globals.php
    2. 7 developer/globals.php
    3. 8 developer/globals.php

Boolean indicating that a menu administrator is running the menu access check.

File

developer/globals.php, line 262
These are the global variables that Drupal uses.

Code

global $menu_admin

Comments

Is this used?

This global appears to be set in menu_overview_form, just before doing the access check and unset 2 lines later. The function in between however seems not to refer to it at all.
Is this a relic?
Still seems to be present in Drupal 7.

Yes, it's used.

Thanks to Drupal

Thanks to Drupal authors.

$menu_admin could be used in implementations of hook_translated_menu_link_alter(...) to check if menu item was generated by menu.admin.inc.

I am going use it in menu_breadcrumb module to fix important issue, see http://drupal.org/node/974742#comment-3857188. So this variable should be kept.

Login or register to post comments