You are here

function nat_node_delete in Node Auto Term [NAT] 7

Same name and namespace in other branches
  1. 7.2 nat.module \nat_node_delete()

Implements hook_node_delete().

File

./nat.module, line 152
NAT - node auto term - is a helper module that automatically creates a term using the same title as a node.

Code

function nat_node_delete($node) {
  if (_nat_check($node)) {
    $nat_config = _nat_variable_get();

    // Deleting the associated term when a node is deleted is optional.
    if (isset($nat_config['delete'][$node->type])) {
      _nat_delete_terms($node->nid);
    }

    // Delete node-term association from the NAT table.
    _nat_delete_association($node->nid);
  }
}