You are here

function format_rss_item in Drupal 5

Same name and namespace in other branches
  1. 4 includes/common.inc \format_rss_item()
  2. 6 includes/common.inc \format_rss_item()
  3. 7 includes/common.inc \format_rss_item()

Format a single RSS item.

Arbitrary elements may be added using the $args associative array.

Related topics

2 calls to format_rss_item()
aggregator_page_rss in modules/aggregator/aggregator.module
Menu callback; generate an RSS 0.92 feed of aggregator items or categories.
node_feed in modules/node/node.module
A generic function for generating RSS feeds from a set of nodes.

File

includes/common.inc, line 1029
Common functions that many Drupal modules will need to reference.

Code

function format_rss_item($title, $link, $description, $args = array()) {
  $output = "<item>\n";
  $output .= ' <title>' . check_plain($title) . "</title>\n";
  $output .= ' <link>' . check_url($link) . "</link>\n";
  $output .= ' <description>' . check_plain($description) . "</description>\n";
  $output .= format_xml_elements($args);
  $output .= "</item>\n";
  return $output;
}