You are here

function xmlsitemap_link_bundle_rename in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_link_bundle_rename()
  2. 6.2 xmlsitemap.module \xmlsitemap_link_bundle_rename()
  3. 2.x xmlsitemap.module \xmlsitemap_link_bundle_rename()

Bundle Rename.

2 calls to xmlsitemap_link_bundle_rename()
xmlsitemap_field_attach_rename_bundle in ./xmlsitemap.module
Implements hook_field_attach_rename_bundle().
xmlsitemap_taxonomy_update_7200 in xmlsitemap_taxonomy/xmlsitemap_taxonomy.install
Change bundles on taxonomy terms from vid to $vocabulary->machine_name.

File

./xmlsitemap.module, line 1160
xmlsitemap XML sitemap

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,
    ));
  }
}