theme_aggregator_feed

Definition

theme_aggregator_feed($feed)
drupal/modules/aggregator.module, line 1025

Description

Format a news feed.

Related topics

Namesort iconDescription
Themeable functionsFunctions that display HTML, and which can be customized by themes.

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;
}