diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-31 12:14:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-31 12:14:04 +0000 |
commit | 41542ef0535fa22201421baec2fcb3c1bcaa10b9 (patch) | |
tree | e00226906c534e09e49aec202fa7be89d8a07dad /includes | |
parent | 24038816f3b43273a1790fb9734b9c864649a21b (diff) | |
download | brdo-41542ef0535fa22201421baec2fcb3c1bcaa10b9.tar.gz brdo-41542ef0535fa22201421baec2fcb3c1bcaa10b9.tar.bz2 |
- Patch #101268 by webernet et al: improve the usability of feed icons.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 4 | ||||
-rw-r--r-- | includes/theme.inc | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index f8b7150a4..37fc16320 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -163,7 +163,7 @@ function drupal_add_feed($url = NULL, $title = '') { static $stored_feed_links = array(); if (!is_null($url)) { - $stored_feed_links[$url] = theme('feed_icon', $url); + $stored_feed_links[$url] = theme('feed_icon', $url, $title); drupal_add_link(array('rel' => 'alternate', 'type' => 'application/rss+xml', @@ -2417,7 +2417,7 @@ function drupal_common_themes() { 'arguments' => array('url' => NULL), ), 'feed_icon' => array( - 'arguments' => array('url' => NULL), + 'arguments' => array('url' => NULL, 'title' => NULL), ), 'closure' => array( 'arguments' => array('main' => 0), diff --git a/includes/theme.inc b/includes/theme.inc index 442d91dc9..eb73fda0c 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1300,9 +1300,14 @@ function theme_xml_icon($url) { /** * Return code that emits an feed icon. - */ -function theme_feed_icon($url) { - if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) { + * + * @param $url + * The url of the feed. + * @param $title + * A descriptive title of the feed. + */ +function theme_feed_icon($url, $title) { + if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), $title)) { return '<a href="'. check_url($url) .'" class="feed-icon">'. $image .'</a>'; } } |