function template_preprocess_aggregator_feed_source

7.x aggregator.pages.inc template_preprocess_aggregator_feed_source(&$variables)
6.x aggregator.pages.inc template_preprocess_aggregator_feed_source(&$variables)

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

See also

aggregator-feed-source.tpl.php

File

drupal-6.x/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');
  }
}