format_rss_item

  1. drupal
    1. 4.7
    2. 5
    3. 6 common.inc
    4. 7 common.inc
Versions
4.7 – 7 format_rss_item($title, $link, $description, $args = array())

Format a single RSS item.

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

Related topics

▾ 2 functions call format_rss_item()

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

Code

includes/common.inc, line 755

<?php
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;
}
?>