Make sitemap sending configurable

This commit is contained in:
Roman Kelesidis 2023-03-09 22:39:07 +07:00
commit 1b443d6f6a
3 changed files with 17 additions and 11 deletions

View file

@ -17,6 +17,7 @@ $map->createSitemap();
if (file_exists(SITEMAP_DIR . '/sitemap.xml')) {
$map_link = make_url('sitemap/sitemap.xml');
$map->sendSitemap('http://google.com/webmasters/sitemaps/ping?sitemap=', $map_link);
$map->sendSitemap('http://www.bing.com/ping?sitemap=', $map_link);
foreach ($bb_cfg['sitemap_sending'] as $source_name => $source_link) {
$map->sendSitemap($source_link, $map_link);
}
}