From: Evan Prodromou Date: Mon, 12 Apr 2010 18:32:01 +0000 (-0400) Subject: add sitemap statement to robots.txt X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f3f652e451bceb64d919f3e8a2fcbeeb6c9dd187;p=quix0rs-gnu-social.git add sitemap statement to robots.txt --- diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index ed876d94f8..6fc7021049 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -76,6 +76,23 @@ class SitemapPlugin extends Plugin } } + /** + * Add sitemap-related information at the end of robots.txt + * + * @param Action $action Action being run + * + * @return boolean hook value. + */ + + function onEndRobotsTxt($action) + { + $url = common_local_url('sitemapindex'); + + print "\nSitemap: $url\n"; + + return true; + } + /** * Map URLs to actions *