function format_rss_item
7.x common.inc | format_rss_item($title, $link, $description, $args = array()) |
6.x common.inc | format_rss_item($title, $link, $description, $args = array()) |
Formats a single RSS item.
Arbitrary elements may be added using the $args associative array.
Related topics
2 calls to format_rss_item()
- node_feed in drupal-7.x/
modules/ node/ node.module - Generates and prints an RSS feed.
- theme_aggregator_page_rss in drupal-7.x/
modules/ aggregator/ aggregator.pages.inc - Prints the RSS page for a feed.
File
- drupal-7.x/
includes/ common.inc, line 1710 - 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;
}