menu_node_delete
function menu_node_delete
menu_node_delete($node)
Implements hook_node_delete().
File
- modules/menu/menu.module, line 554
- Allows administrators to customize the site's navigation menus.
Code
function menu_node_delete($node) { // Delete all menu module links that point to this node. $result = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND module = 'menu'", array(':path' => 'node/' . $node->nid), array('fetch' => PDO::FETCH_ASSOC)); foreach ($result as $m) { menu_link_delete($m['mlid']); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!menu!menu.module/function/menu_node_delete/7.x