You are here

function xmlsitemap_node_comment in XML sitemap 6.2

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

Implements hook_comment().

File

xmlsitemap_node/xmlsitemap_node.module, line 96

Code

function xmlsitemap_node_comment($comment, $op) {
  switch ($op) {
    case 'update':
    case 'publish':
    case 'unpublish':
    case 'delete':
      $comment = (object) $comment;
      if ($node = node_load($comment->nid, NULL, TRUE)) {
        $link = xmlsitemap_node_create_link($node);
        xmlsitemap_link_save($link);
      }
      break;
  }
}