Commit 2d8cc6cb authored by Dave Reid's avatar Dave Reid

by Dave Reid: OMG we have hooks for when bundles are renamed or deleted.

parent 6740cea2
......@@ -1085,6 +1085,20 @@ function xmlsitemap_get_bundle_path($entity, $bundle) {
}
}
/**
* Implements hook_field_attach_rename_bundle().
*/
function xmlsitemap_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) {
xmlsitemap_link_bundle_rename($entity_type, $bundle_old, $bundle_new);
}
/**
* Implements hook_field_attach_delete_bundle().
*/
function xmlsitemap_field_attach_delete_bundle($entity_type, $bundle, $instances) {
xmlsitemap_link_bundle_delete($entity_type, $bundle, TRUE);
}
/**
* Determine the frequency of updates to a link.
*
......
......@@ -97,24 +97,6 @@ function xmlsitemap_node_comment_delete(stdClass $comment) {
xmlsitemap_node_comment_update($comment);
}
/**
* Implements_hook_node_type_update().
*/
function xmlsitemap_node_node_type_update(stdClass $info) {
// Cannot perform xmlsitemap_link_bundle_settings_save() here since
// node_type_form_submit() strips all non-essential data from $info.
if (!empty($info->old_type) && $info->old_type != $info->type) {
xmlsitemap_link_bundle_rename('node', $info->old_type, $info->type);
}
}
/**
* Implements hook_node_type_delete().
*/
function xmlsitemap_node_node_type_delete(stdClass $info) {
xmlsitemap_link_bundle_delete('node', $info->type);
}
/**
* Implements hook_field_extra_fields().
*/
......
......@@ -103,13 +103,6 @@ function xmlsitemap_taxonomy_vocabulary_update(stdClass $vocabulary) {
}
}
/**
* Implements hook_taxonomy_vocabulary_delete().
*/
function xmlsitemap_taxonomy_vocabulary_delete(stdClass $vocabulary) {
xmlsitemap_link_bundle_delete('taxonomy_term', $vocabulary->machine_name);
}
/**
* Implements hook_taxonomy_term_insert() {
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment