function xmlsitemap_node_comment in XML sitemap 6.2
Same name and namespace in other branches
- 5.2 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_comment()
- 5 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_comment()
- 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;
}
}