From 78ab655c575100e3257da02e38b4dcebf9fa82b2 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 10 Feb 2020 21:19:53 +0100 Subject: [PATCH] Include Sitemap link if the plugin is enabled --- bl-plugins/robots/plugin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bl-plugins/robots/plugin.php b/bl-plugins/robots/plugin.php index d69794bb..3e875e6d 100644 --- a/bl-plugins/robots/plugin.php +++ b/bl-plugins/robots/plugin.php @@ -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); }