You are here

function nodehierarchy_delete_children in Node Hierarchy 6

Same name and namespace in other branches
  1. 5 nodehierarchy.module \nodehierarchy_delete_children()

Delete the nodehierarchy information when a node is deleted.

1 call to nodehierarchy_delete_children()
nodehierarchy_node_delete_submit in ./nodehierarchy.module
Submit function for the node delete confirm form.

File

./nodehierarchy.module, line 485

Code

function nodehierarchy_delete_children($nid) {
  if ($nid) {
    foreach (nodehierarchy_get_children($nid) as $child) {
      nodehierarchy_delete_children($child);
      node_delete($child);
    }
  }
}