function template_preprocess_aggregator_summary_item

Processes variables for aggregator-summary-item.tpl.php.

See also

aggregator-summary-item.tpl.php

File

drupal/core/modules/aggregator/aggregator.pages.inc, line 539
User page callbacks for the aggregator module.

Code

function template_preprocess_aggregator_summary_item(&$variables) {
  $item = $variables['item'];
  $variables['item_url'] = l(check_plain($item->title), check_url(url($item->link, array(
    'absolute' => TRUE,
  ))), array(
    'attributes' => array(
      'class' => array(
        'feed-item-url',
      ),
    ),
  ));
  $variables['item_age'] = theme('datetime', array(
    'attributes' => array(
      'datetime' => format_date($item->timestamp, 'html_datetime', '', 'UTC'),
      'class' => array(
        'feed-item-age',
      ),
    ),
    'text' => t('%age old', array(
      '%age' => format_interval(REQUEST_TIME - $item->timestamp),
    )),
    'html' => TRUE,
  ));
}