menu_node_save

Versions
menu_node
menu_node_save($nid, $mlid, $hook = 'update')

Save records to the {menu_node} table.

After saving, we fire the appropriate menu_node hook, either 'insert' or 'update'.

Parameters

$nid The node id.

$mlid The menu link id.

Code

./menu_node.module, line 274

<?php
function menu_node_save($nid, $mlid, $hook = 'update') {
  $new = menu_node_exists($nid, $mlid);
  // We only save if the record does not exist, otherwise, call the update hook.
  if (empty($new)) {
    $record = array('nid' => $nid, 'mlid' => $mlid);
    drupal_write_record('menu_node', $record);
    $hook = 'insert';
  }
  _menu_node_invoke($nid, $mlid, $hook);
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List