From 2d059380821851cc5dcfcf6c32238f2856ddf991 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 23 Aug 2006 07:23:09 +0000 Subject: - Patch #66569 by m3avrck: Consolidate the drupal_add_link() calls. --- includes/common.inc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'includes') 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; } -- cgit v1.2.3