diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-23 07:23:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-23 07:23:09 +0000 |
commit | 2d059380821851cc5dcfcf6c32238f2856ddf991 (patch) | |
tree | a19d796a137bcd9d9180bb9fbaf718c1f5478424 /includes | |
parent | 055844e74ff3a4cb8de09db274c8260b966baac7 (diff) | |
download | brdo-2d059380821851cc5dcfcf6c32238f2856ddf991.tar.gz brdo-2d059380821851cc5dcfcf6c32238f2856ddf991.tar.bz2 |
- Patch #66569 by m3avrck: Consolidate the drupal_add_link() calls.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index c9de3a434..e2d51f23d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -153,14 +153,19 @@ function drupal_get_headers() { * * @param $url * The url for the feed - * @param $theme_function - * The name of the theming function to use to style the feed icon, defaults to theme_feed_icon() + * @param $title + * The title of the feed */ -function drupal_add_feed($url = NULL, $theme_function = 'feed_icon') { +function drupal_add_feed($url = NULL, $title = '') { static $stored_feed_links = array(); if (!is_null($url)) { - $stored_feed_links[$url] = theme($theme_function, $url); + $stored_feed_links[$url] = theme('feed_icon', $url); + + drupal_add_link(array('rel' => 'alternate', + 'type' => 'application/rss+xml', + 'title' => $title, + 'href' => $url)); } return $stored_feed_links; } |