You are here

function taxonomy_nodeapi in Drupal 6

Same name and namespace in other branches
  1. 4 modules/taxonomy.module \taxonomy_nodeapi()
  2. 5 modules/taxonomy/taxonomy.module \taxonomy_nodeapi()

Implementation of hook_nodeapi().

1 call to taxonomy_nodeapi()
node_search in modules/node/node.module
Implementation of hook_search().

File

modules/taxonomy/taxonomy.module, line 1250
Enables the organization of content into categories.

Code

function taxonomy_nodeapi(&$node, $op, $arg = 0) {
  switch ($op) {
    case 'load':
      $output['taxonomy'] = taxonomy_node_get_terms($node);
      return $output;
    case 'insert':
      if (!empty($node->taxonomy)) {
        taxonomy_node_save($node, $node->taxonomy);
      }
      break;
    case 'update':
      if (!empty($node->taxonomy)) {
        taxonomy_node_save($node, $node->taxonomy);
      }
      break;
    case 'delete':
      taxonomy_node_delete($node);
      break;
    case 'delete revision':
      taxonomy_node_delete_revision($node);
      break;
    case 'validate':
      taxonomy_node_validate($node);
      break;
    case 'rss item':
      return taxonomy_rss_item($node);
    case 'update index':
      return taxonomy_node_update_index($node);
  }
}