Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
xmlsitemap
Commits
2d8cc6cb
Commit
2d8cc6cb
authored
Aug 31, 2010
by
Dave Reid
Browse files
by Dave Reid: OMG we have hooks for when bundles are renamed or deleted.
parent
6740cea2
Changes
3
Hide whitespace changes
Inline
Side-by-side
xmlsitemap.module
View file @
2d8cc6cb
...
...
@@ -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.
*
...
...
xmlsitemap_node/xmlsitemap_node.module
View file @
2d8cc6cb
...
...
@@ -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().
*/
...
...
xmlsitemap_taxonomy/xmlsitemap_taxonomy.module
View file @
2d8cc6cb
...
...
@@ -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() {
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment