Same name and namespace in other branches
  1. 4.7.x modules/aggregator.module \theme_aggregator_feed()
  2. 5.x modules/aggregator/aggregator.module \theme_aggregator_feed()

Format a news feed.

Related topics

1 theme call to theme_aggregator_feed()
aggregator_page_source in modules/aggregator.module
Menu callback; displays all the items captured from a particular feed.

File

modules/aggregator.module, line 1025
Used to aggregate syndicated content (RSS and RDF).

Code

function theme_aggregator_feed($feed) {
  $output = '';
  if ($feed->image) {
    $output .= $feed->image;
  }
  $output .= $feed->description;
  $output .= '<h3>' . t('URL') . "</h3>\n";
  $output .= theme('xml_icon', $feed->url);
  $output .= '<a href="' . check_url($feed->link) . '">' . check_plain($feed->link) . "</a>\n";
  $output .= '<h3>' . t('Last update') . "</h3>\n";
  $updated = t('%time ago', array(
    '%time' => format_interval(time() - $feed->checked),
  ));
  if (user_access('administer news feeds')) {
    $output .= l($updated, 'admin/aggregator');
  }
  else {
    $output .= $updated;
  }
  return $output;
}