theme_aggregator_feed

Versions
5
theme_aggregator_feed($feed)

Format a news feed.

Related topics

Code

drupal/modules/aggregator/aggregator.module, line 1312

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.