{"id":8756,"date":"2010-04-14T11:03:03","date_gmt":"2010-04-14T11:03:03","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/well-known\/"},"modified":"2014-01-14T10:44:01","modified_gmt":"2014-01-14T10:44:01","slug":"well-known","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/well-known\/","author":130940,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.1","stable_tag":"1.0.1","tested":"3.7.41","requires":"3.5.1","requires_php":"","requires_plugins":"","header_name":"\/.well-known\/","header_author":"pfefferle","header_description":"","assets_banners_color":"","last_updated":"2014-01-14 10:44:01","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.14101978.de","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/well-known\/","header_author_uri":"http:\/\/notizblog.org\/","rating":0,"author_block_rating":0,"active_installs":30,"downloads":3272,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.2.1","0.2.1.1","0.3","0.4","0.5","0.5.1","0.6.0","0.6.1","1.0.0","1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[6645,54762],"plugin_category":[],"plugin_contributors":[77968],"plugin_business_model":[],"class_list":["post-8756","plugin","type-plugin","status-closed","hentry","plugin_tags-discovery","plugin_tags-well-known","plugin_contributors-pfefferle","plugin_committers-pfefferle"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/well-known.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin enables \"Well-Known URIs\" support for WordPress (RFC 5785: http:\/\/tools.ietf.org\/html\/rfc5785).<\/p>\n\n<p>From the RFC:<\/p>\n\n<p>It is increasingly common for Web-based protocols to require the\n   discovery of policy or other information about a host (\"site-wide\n   metadata\") before making a request.  For example, the Robots\n   Exclusion Protocol <a href=\"http:\/\/www.robotstxt.org\/\">http:\/\/www.robotstxt.org\/<\/a> specifies a way for\n   automated processes to obtain permission to access resources;\n   likewise, the Platform for Privacy Preferences\n   tells user-agents how to discover privacy policy beforehand.<\/p>\n\n<p>While there are several ways to access per-resource metadata (e.g.,\n   HTTP headers, WebDAV's PROPFIND [RFC4918]), the perceived overhead\n   (either in terms of client-perceived latency and\/or deployment\n   difficulties) associated with them often precludes their use in these\n   scenarios.<\/p>\n\n<p>When this happens, it is common to designate a \"well-known location\"\n   for such data, so that it can be easily located.  However, this\n   approach has the drawback of risking collisions, both with other such\n   designated \"well-known locations\" and with pre-existing resources.<\/p>\n\n<p>To address this, this memo defines a path prefix in HTTP(S) URIs for\n   these \"well-known locations\", \"\/.well-known\/\".  Future specifications\n   that need to define a resource for such site-wide metadata can\n   register their use to avoid collisions and minimise impingement upon\n   sites' URI space.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>well-known<\/code>-folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the <em>Plugins<\/em> menu in WordPress<\/li>\n<li>...and that's it :)<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How can I define a well-known uri?<\/dt>\n<dd><p>Set a callback for an URI (\/.well-known\/robots.txt). The action is a combination of <code>well_known_<\/code> and the file-name, in this case the hook must look like<\/p>\n\n<pre><code>add_action('well_known_robots.txt', 'robots_txt');\n<\/code><\/pre>\n\n<p>Print robots.txt:<\/p>\n\n<pre><code>function robots_txt($query) {\n  header('Content-Type: text\/plain; charset=' . get_option('blog_charset'), true);\n  echo \"User-agent: *\";\n  echo \"Allow: \/\";\n\n  exit;\n}\n<\/code><\/pre><\/dd>\n<dt>Is there an implementation where I can write off?<\/dt>\n<dd><p>Yes, you can find an example plugin, which defines a well-known-uri,\nhere: http:\/\/wordpress.org\/extend\/plugins\/host-meta\/<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.6.2<\/h4>\n\n<ul>\n<li>bug fix<\/li>\n<\/ul>\n\n<h4>0.6.0<\/h4>\n\n<ul>\n<li>refactored the code<\/li>\n<\/ul>\n\n<h4>0.5.1<\/h4>\n\n<ul>\n<li>fixed some php-warnings<\/li>\n<\/ul>\n\n<h4>0.5<\/h4>\n\n<ul>\n<li>better action\/filter<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>some improvements for host-meta (jrd)<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>adding well-known uris a bit more wordpress-like<\/li>\n<\/ul>\n\n<h4>0.2.1.1<\/h4>\n\n<ul>\n<li>Ooops, copy&amp;paste bug<\/li>\n<\/ul>\n\n<h4>0.2.1<\/h4>\n\n<ul>\n<li>Forgot to flush the rewrite rules<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Better doku<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"This plugin enables &quot;Well-Known URIs&quot; support for WordPress","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/8756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=8756"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pfefferle"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=8756"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=8756"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=8756"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=8756"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=8756"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=8756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}