Include Sitemap link if the plugin is enabled

This commit is contained in:
Diego Najar 2020-02-10 21:19:53 +01:00
parent 29c8341b2f
commit 78ab655c57
1 changed files with 4 additions and 0 deletions

View File

@ -58,6 +58,10 @@ class pluginRobots extends Plugin {
$webhook = 'robots.txt';
if ($this->webhook($webhook)) {
header('Content-type: text/plain');
// Include link to sitemap in robots.txt if the plugin is enabled
if (pluginActivated('pluginSitemap')) {
echo 'Sitemap: '.DOMAIN_BASE.'sitemap.xml';
}
echo $this->getValue('robotstxt');
exit(0);
}