You are here

function _nat_delete_terms in Node Auto Term [NAT] 6

Same name and namespace in other branches
  1. 5 nat.module \_nat_delete_terms()
  2. 6.2 nat.module \_nat_delete_terms()
  3. 7.2 nat.module \_nat_delete_terms()
  4. 7 nat.module \_nat_delete_terms()

Delete associated terms from the taxonomy system. @todo Options to delete child nodes as well etc.

Parameters

$nid: Node ID of the node whose NAT-terms are to be deleted.

1 call to _nat_delete_terms()
nat_nodeapi in ./nat.module
Implementation of hook_nodeapi().

File

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

Code

function _nat_delete_terms($nid) {
  $terms = nat_get_terms($nid);
  foreach ($terms as $term) {
    taxonomy_del_term($term->tid);
  }
}