You are here

function xmlsitemap_link_bundle_rename in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_link_bundle_rename()
  2. 7.2 xmlsitemap.module \xmlsitemap_link_bundle_rename()
  3. 2.x xmlsitemap.module \xmlsitemap_link_bundle_rename()
1 call to xmlsitemap_link_bundle_rename()
xmlsitemap_node_node_type in xmlsitemap_node/xmlsitemap_node.module
Implements hook_node_type().

File

./xmlsitemap.module, line 990
Main file for the xmlsitemap module.

Code

function xmlsitemap_link_bundle_rename($entity, $bundle_old, $bundle_new) {
  if ($bundle_old != $bundle_new) {
    $settings = xmlsitemap_link_bundle_load($entity, $bundle_old);
    variable_del("xmlsitemap_settings_{$entity}_{$bundle_old}");
    xmlsitemap_link_bundle_settings_save($entity, $bundle_new, $settings, FALSE);
    xmlsitemap_link_update_multiple(array(
      'subtype' => $bundle_new,
    ), array(
      'type' => $entity,
      'subtype' => $bundle_old,
    ));
  }
}