| Versions | |
|---|---|
| 4.7 – 5 | theme_aggregator_feed($feed) |
Format a news feed.
modules/
<?php
function theme_aggregator_feed($feed) {
$output = '<div class="feed-source">';
$output .= theme('feed_icon', $feed->url) . "\n";
$output .= $feed->image;
$output .= '<div class="feed-description">' . aggregator_filter_xss($feed->description) . "</div>\n";
$output .= '<div class="feed-url"><em>' . t('URL:') . '</em> ' . l($feed->link, $feed->link, array(), NULL, NULL, TRUE) . "</div>\n";
if ($feed->checked) {
$updated = t('@time ago', array('@time' => format_interval(time() - $feed->checked)));
}
else {
$updated = t('never');
}
if (user_access('administer news feeds')) {
$updated = l($updated, 'admin/content/aggregator');
}
$output .= '<div class="feed-updated"><em>' . t('Updated:') . "</em> $updated</div>";
$output .= "</div>\n";
return $output;
}
?>