You are here

function xmlsitemap_sitemap_delete_multiple in XML sitemap 8

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

Delete multiple XML sitemaps.

Parameters

array $smids: An array of XML sitemap IDs.

Related topics

1 call to xmlsitemap_sitemap_delete_multiple()
xmlsitemap_sitemap_delete in ./xmlsitemap.module
Delete an XML sitemap.

File

./xmlsitemap.module, line 390
xmlsitemap XML sitemap

Code

function xmlsitemap_sitemap_delete_multiple(array $smids) {
  if (!empty($smids)) {
    $sitemaps = xmlsitemap_sitemap_load_multiple($smids);
    foreach ($sitemaps as $sitemap) {
      $sitemap
        ->delete();
      \Drupal::moduleHandler()
        ->invokeAll('xmlsitemap_sitemap_delete', [
        $sitemap,
      ]);
    }
  }
}