You are here

function hook_xmlsitemap_rebuild_clear in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.api.php \hook_xmlsitemap_rebuild_clear()
  2. 2.x xmlsitemap.api.php \hook_xmlsitemap_rebuild_clear()

Respond to XML sitemap link clearing and rebuilding.

Parameters

array $types: An array of link types that are being rebuilt.

bool $save_custom: If links with overridden status and/or priority are being removed or not.

1 invocation of hook_xmlsitemap_rebuild_clear()
xmlsitemap_rebuild_clear in ./xmlsitemap.generate.inc
Clear all sitemap links for given entity types.

File

./xmlsitemap.api.php, line 142
Hooks provided by the XML sitemap module.

Code

function hook_xmlsitemap_rebuild_clear(array $types, $save_custom) {
  db_delete('mytable')
    ->condition('link_type', $types, 'IN')
    ->execute();
}