Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Allows other modules to insert autodiscovery code (e.g. FOAF, ATOM, RSD) on main page
modules which wants to insert autodiscovery code will have to provide module_default_node() that does drupal_set_html_head.
e.g. blogapi.module can have the the following function to provide autodiscovery of its xmlrpc engine vis RSD
function blogapi_default_node() {
drupal_set_html_head('<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . url('blogapi/rsd',NULL,NULL,TRUE) . '" />');
}
Comment | File | Size | Author |
---|---|---|---|
node.autodiscovery.diff | 832 bytes | jseng | |
Comments
Comment #1
jseng CreditAttribution: jseng commentedOh yea. This also fix the bug where the RSS autodiscovery does not return absolute URL.
This is the reason why some blog/search engine is unable to crawl site RSS properly.
Comment #2
Dries CreditAttribution: Dries commentedAccording to http://diveintomark.org/archives/2002/06/02/important_change_to_the_link..., the link tag should not be fully qualified (absolute). I committed the patch nonetheless to both HEAD and DRUPAL-4-4.
Comment #3
(not verified) CreditAttribution: commented