theme_aggregator_feed

Versions
4.6 – 5
theme_aggregator_feed($feed)

Format a news feed.

Related topics

Code

modules/aggregator.module, line 1025

<?php
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
 
 

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.