diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-08-23 05:55:38 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-08-23 05:55:38 +0000 |
commit | a58d877108f6b7ff6712c6261815c6092c7f6949 (patch) | |
tree | 6c76f23e2bc4caf442d7643f3fe0fd189c20f3f4 /includes/common.inc | |
parent | 32e22f1f9a69618ba94e2015cf4f9d5c8ebb80e1 (diff) | |
download | brdo-a58d877108f6b7ff6712c6261815c6092c7f6949.tar.gz brdo-a58d877108f6b7ff6712c6261815c6092c7f6949.tar.bz2 |
#66569 by m3avrck. Put all the feed icons in the same place.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 79bf69b0e..c9de3a434 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -148,6 +148,34 @@ function drupal_get_headers() { return drupal_set_header(); } +/* + * Add a feed URL for the current page. + * + * @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() + */ +function drupal_add_feed($url = NULL, $theme_function = 'feed_icon') { + static $stored_feed_links = array(); + + if (!is_null($url)) { + $stored_feed_links[$url] = theme($theme_function, $url); + } + return $stored_feed_links; +} + +/** + * Get the feed URLs for the current page. + * + * @param $delimiter + * The delimiter to split feeds by + */ +function drupal_get_feeds($delimiter = "\n") { + $feeds = drupal_add_feed(); + return implode($feeds, $delimiter); +} + /** * @name HTTP handling * @{ |