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
Login or register to post commentsBoolean indicating that a menu administrator is running the menu access check.
global $menu_admin
Login or register to post comments
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.
See
user_is_anonymous().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.