function taxonomy_nodeapi in Drupal 5
Same name and namespace in other branches
- 4 modules/taxonomy.module \taxonomy_nodeapi()
- 6 modules/taxonomy/taxonomy.module \taxonomy_nodeapi()
Implementation of hook_nodeapi().
File
- modules/
taxonomy/ taxonomy.module, line 1328 - 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->nid);
return $output;
case 'insert':
taxonomy_node_save($node->nid, $node->taxonomy);
break;
case 'update':
taxonomy_node_save($node->nid, $node->taxonomy);
break;
case 'delete':
taxonomy_node_delete($node->nid);
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);
}
}