function hook_menu_link_alter


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 system.api.php hook_menu_link_alter(&$item)
cle7 system.api.php hook_menu_link_alter(&$item)
elmsmedia7 system.api.php hook_menu_link_alter(&$item)
icor7 system.api.php hook_menu_link_alter(&$item)
meedjum_blog7 system.api.php hook_menu_link_alter(&$item)
mooc7 system.api.php hook_menu_link_alter(&$item)

Alter the data being saved to the {menu_links} table by menu_link_save().


$item: Associative array defining a menu link as passed into menu_link_save().

See also


Related topics

13 functions implement hook_menu_link_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

admin_menu_translated_menu_link_alter in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_translated_menu_link_alter().
bakery_translated_menu_link_alter in sites/all/modules/ulmus/bakery/bakery.module
Implements hook_translated_menu_link_alter().
devel_menu_link_alter in sites/all/modules/ulmus/devel/devel.module
An implementation of hook_menu_link_alter(). Flag this link as needing alter at display time. This is more robust than setting alter in hook_menu().
devel_translated_menu_link_alter in sites/all/modules/ulmus/devel/devel.module
An implementation of hook_translated_menu_item_alter(). Append dynamic querystring 'destination' to several of our own menu items.
hidden_nodes_menu_link_alter in sites/all/modules/elmsln_contrib/hidden_nodes/hidden_nodes.module
Implements hook_menu_link_alter().

... See full list

1 invocation of hook_menu_link_alter()
menu_link_save in includes/
Saves a menu link.


modules/system/system.api.php, line 1305
Hooks provided by Drupal core and the System module.


function hook_menu_link_alter(&$item) {
  // Make all new admin links hidden (a.k.a disabled).
  if (strpos($item['link_path'], 'admin') === 0 && empty($item['mlid'])) {
    $item['hidden'] = 1;
  // Flag a link to be altered by hook_translated_menu_link_alter().
  if ($item['link_path'] == 'devel/cache/clear') {
    $item['options']['alter'] = TRUE;
  // Flag a link to be altered by hook_translated_menu_link_alter(), but only
  // if it is derived from a menu router item; i.e., do not alter a custom
  // menu link pointing to the same path that has been created by a user.
  if ($item['link_path'] == 'user' && $item['module'] == 'system') {
    $item['options']['alter'] = TRUE;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.