hook_menu_link_delete

Versions
7
hook_menu_link_delete($link)

Inform modules that a menu link has been deleted.

This hook is used to notify modules that menu items have been deleted. Contributed modules may use the information to perform actions based on the information entered into the menu system.

See also

hook_menu_link_insert()

@see hook_menu_link_update()

Parameters

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

Related topics

Code

modules/menu/menu.api.php, line 386

<?php
function hook_menu_link_delete($link) {
  // Delete the record from our table.
  db_delete('menu_example')
    ->condition('mlid', $link['mlid'])
    ->execute();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.