drupal_add_feed
- Versions
- 5 – 7
drupal_add_feed($url = NULL, $title = '')
Add a feed URL for the current page.
This function can be called as long the HTML header hasn't been sent.
Parameters
$url A url for the feed.
$title The title of the feed.
Code
includes/common.inc, line 373
<?php
function drupal_add_feed($url = NULL, $title = '') {
$stored_feed_links = &drupal_static(__FUNCTION__, array());
if (isset($url)) {
$stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
drupal_add_html_head_link(array('rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => $title,
'href' => $url));
}
return $stored_feed_links;
}
?>Login or register to post comments 