theme_aggregator_feed

Versions
4.6 – 5
theme_aggregator_feed($feed)

Format a news feed.

Related topics

Code

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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.