format_rss_item

Definition

format_rss_item($title, $link, $description, $args = array())
includes/common.inc, line 754

Description

Format a single RSS item.

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

Related topics

Namesort iconDescription
FormattingFunctions to format numbers, strings, dates, etc.
Input validationFunctions to validate user input.

Code

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

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.