You are here

function book_menus_node_update in Book Menus 7

Implements hook_node_update().

File

./book_menus.module, line 343
Functionality for book_menus.module.

Code

function book_menus_node_update($node) {

  // Check if the original plid was set.
  if (!empty($node->original_plid)) {

    // book.module changes the plid if the plid wasn't a book item.
    // Override that and set it to the original parent.
    $node->book['plid'] = $node->original_plid;

    // Save the menu link.
    menu_link_save($node->book);
  }
}