Skip to content

Commit

Permalink
fixed the doku
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Apr 20, 2010
1 parent 1e9c3f4 commit 3e16e5f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@ From the RFC:

= How can I define a well-known uri? =


Set a callback for an URI (/.well-known/robots.txt)

`add_filter('well-known', array('RobotsTxt', 'hostMetaUri'));
function hostMetaUri($wellKnown) {

`add_filter('well-known', array('RobotsTxt', 'robotsUri'));
function robotsUri($wellKnown) {
return $wellKnown[] = array('robots.txt' => array('RobotsTxt', 'printHostMeta'));
}`


Print robots.txt:


`function printHostMeta() {
header('Content-Type: text/plain; charset=' . get_option('blog_charset'), true);
echo "User-agent: *";
Expand All @@ -69,5 +73,6 @@ Print robots.txt:

= Is there an implementation where I can write off? =


Yes, you can find an example plugin, which defines a well-known-uri,
here: http://wordpress.org/extend/plugins/host-meta/

0 comments on commit 3e16e5f

Please sign in to comment.