You are here

function template_preprocess_aggregator_feed_source in Drupal 6

Same name and namespace in other branches
  1. 7 modules/aggregator/aggregator.pages.inc \template_preprocess_aggregator_feed_source()

Process variables for aggregator-feed-source.tpl.php.

See also

aggregator-feed-source.tpl.php

File

modules/aggregator/aggregator.pages.inc, line 472
User page callbacks for the aggregator module.

Code

function template_preprocess_aggregator_feed_source(&$variables) {
  $feed = $variables['feed'];
  $variables['source_icon'] = theme('feed_icon', $feed->url, t('!title feed', array(
    '!title' => $feed->title,
  )));
  $variables['source_image'] = $feed->image;
  $variables['source_description'] = aggregator_filter_xss($feed->description);
  $variables['source_url'] = check_url(url($feed->link, array(
    'absolute' => TRUE,
  )));
  if ($feed->checked) {
    $variables['last_checked'] = t('@time ago', array(
      '@time' => format_interval(time() - $feed->checked),
    ));
  }
  else {
    $variables['last_checked'] = t('never');
  }
  if (user_access('administer news feeds')) {
    $variables['last_checked'] = l($variables['last_checked'], 'admin/content/aggregator');
  }
}