/** * Create an RSS Feed * * @param string $title - feed title * @param string $link - url feed title should point to * @param string $description - feed description * @param array $items - $items[0] = array('title'=>TITLE, 'link'=>URL, 'date'=>TIMESTAMP, 'description'=>DESCRIPTION) * @param string $content_type e.g. 'application/xml' or 'text/plain' */ public function rss($h, $title = '', $link = '', $description = '', $items = array(), $content_type = 'application/xml') { require_once EXTENSIONS . 'RSSWriterClass/rsswriter.php'; $feed = new \RSS($h->url(array('page' => 'rss'))); $feed->title = stripslashes(html_entity_decode(urldecode($title), ENT_QUOTES, 'UTF-8')); $feed->link = html_entity_decode($link, ENT_QUOTES, 'UTF-8'); $feed->description = $description; if ($items) { $feed->addItem($items); } echo $feed->out($content_type); }