Commit 8d39247a authored by andrei.dincu's avatar andrei.dincu

Issue #2249723 by andrei.dincu: Get sitemap uri in xmlsitemap_robotstxt() hook

parent 8666e971
......@@ -293,7 +293,8 @@ function xmlsitemap_modules_disabled(array $modules) {
*/
function xmlsitemap_robotstxt() {
if ($sitemap = xmlsitemap_sitemap_load_by_context()) {
$robotstxt[] = 'Sitemap: ' . url($sitemap->uri['path'], $sitemap->uri['options']);
$uri = xmlsitemap_sitemap_uri($sitemap);
$robotstxt[] = 'Sitemap: ' . url($uri['path'], $uri['options']);
return $robotstxt;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment