You are here

function nat_node_insert in Node Auto Term [NAT] 7.2

Same name and namespace in other branches
  1. 7 nat.module \nat_node_insert()

Implements hook_node_insert().

File

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

Code

function nat_node_insert($node) {
  if (_nat_check($node)) {

    // Add term(s).
    $terms = _nat_add_terms($node);

    // Save node-term association in the NAT table.
    _nat_save_association($node->nid, $terms);
  }
}