]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add sitemap statement to robots.txt
authorEvan Prodromou <evan@status.net>
Mon, 12 Apr 2010 18:32:01 +0000 (14:32 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 1 Jun 2010 20:52:27 +0000 (13:52 -0700)
plugins/Sitemap/SitemapPlugin.php

index ed876d94f822d77cb8c8aeff6ede92808960dcea..6fc7021049a5f5b0d2f94ef686c71fa8328b1429 100644 (file)
@@ -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
      *