You are here

function nat_taxonomy_vocabulary_delete in Node Auto Term [NAT] 7

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

Implements hook_taxonomy_vocabulary_delete().

File

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

Code

function nat_taxonomy_vocabulary_delete($vocabulary) {
  $config = _nat_variable_get();
  foreach ($config['types'] as $type => $vids) {
    unset($config['types'][$type][$vocabulary->vid]);
  }
  foreach ($config['associations'] as $type => $vids) {
    unset($config['associations'][$type][$vocabulary->vid]);
  }
  variable_set('nat_config', $config);
}