theme_aggregator_feed

5 aggregator.module theme_aggregator_feed($feed)

Format a news feed.

Related topics

1 theme call to theme_aggregator_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;
}
Login or register to post comments