format_rss_channel($title, $link, $description, $items, $language = 'en', $args = array())
drupal-4-6/includes/common.inc, line 644
Formats an RSS channel.
Arbitrary elements may be added using the $args associative array.
function format_rss_channel($title, $link, $description, $items, $language = 'en', $args = array()) {
// arbitrary elements may be added using the $args associative array
$output = "<channel>\n";
$output .= ' <title>'. check_plain($title) ."</title>\n";
$output .= ' <link>'. check_url($link) ."</link>\n";
$output .= ' <description>'. check_plain($description) ."</description>\n";
$output .= ' <language>'. check_plain($language) ."</language>\n";
foreach ($args as $key => $value) {
$output .= ' <'. $key .'>'. check_plain($value) ."</$key>\n";
}
$output .= $items;
$output .= "</channel>\n";
return $output;
}