You are here

function xmlsitemap_node_node_type in XML sitemap 6

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

Implementation of hook_node_type().

File

xmlsitemap_node/xmlsitemap_node.module, line 206
Adds nodes to the sitemap.

Code

function xmlsitemap_node_node_type($op, $info) {
  if ($op == 'delete') {
    variable_del('xmlsitemap_node_type_priority_' . $info->type);
  }
  elseif ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
    variable_set('xmlsitemap_node_type_priority_' . $info->type, variable_get('xmlsitemap_node_type_priority_' . $info->old_type, 0.5));
    variable_del('xmlsitemap_node_type_priority_' . $info->old_type);
  }
}