function theme_feedapi_export_opml in FeedAPI 6
Theme the OPML feed output.
Parameters
$feeds: An array of the feeds to theme.
1 theme call to theme_feedapi_export_opml()
- feedapi_export_opml in ./
feedapi.opml.inc - Generates an OPML representation of all feeds.
File
- ./
feedapi.opml.inc, line 102 - OPML import and export for FeedAPI
Code
function theme_feedapi_export_opml($feeds) {
drupal_set_header('Content-Type: text/xml; charset=utf-8');
$output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$output .= "<opml version=\"1.1\">\n";
$output .= "<head>\n";
$output .= '<title>' . check_plain(variable_get('site_name', 'Drupal')) . "</title>\n";
$output .= '<dateModified>' . gmdate('r') . "</dateModified>\n";
$output .= "</head>\n";
$output .= "<body>\n";
foreach ($feeds as $feed) {
$output .= '<outline text="' . check_plain($feed->title) . '" xmlUrl="' . check_url($feed->url) . "\" />\n";
}
$output .= "</body>\n";
$output .= "</opml>\n";
print $output;
}