You are here

function hook_xmlsitemap_sitemap_delete in XML sitemap 7.2

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

Respond to XML sitemap deletion.

This hook is invoked from xmlsitemap_sitemap_delete_multiple() after the XML sitemap has been removed from the table in the database.

Parameters

object $sitemap: The XML sitemap object that was deleted.

1 invocation of hook_xmlsitemap_sitemap_delete()
xmlsitemap_sitemap_delete_multiple in ./xmlsitemap.module
Delete multiple XML sitemaps.

File

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

Code

function hook_xmlsitemap_sitemap_delete(stdClass $sitemap) {
  db_delete('mytable')
    ->condition('smid', $sitemap->smid, '=')
    ->execute();
}