You are here

function xmlsitemap_node_nodeapi in XML sitemap 6.2

Same name and namespace in other branches
  1. 5.2 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_nodeapi()
  2. 5 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_nodeapi()
  3. 6 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_nodeapi()

Implements hook_nodeapi().

File

xmlsitemap_node/xmlsitemap_node.module, line 80

Code

function xmlsitemap_node_nodeapi(stdClass &$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'insert':
    case 'update':
      $link = xmlsitemap_node_create_link($node);
      xmlsitemap_link_save($link);
      break;
    case 'delete':
      xmlsitemap_link_delete('node', $node->nid);
      break;
  }
}