function template_preprocess_aggregator_item
template_preprocess_aggregator_item(&$variables)
Processes variables for aggregator-item.tpl.php.
See also
File
- modules/aggregator/aggregator.pages.inc, line 316
- User page callbacks for the Aggregator module.
Code
function template_preprocess_aggregator_item(&$variables) { $item = $variables['item']; $variables['feed_url'] = check_url($item->link); $variables['feed_title'] = check_plain($item->title); $variables['content'] = aggregator_filter_xss($item->description); $variables['source_url'] = ''; $variables['source_title'] = ''; if (isset($item->ftitle) && isset($item->fid)) { $variables['source_url'] = url("aggregator/sources/$item->fid"); $variables['source_title'] = check_plain($item->ftitle); } if (date('Ymd', $item->timestamp) == date('Ymd')) { $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->timestamp))); } else { $variables['source_date'] = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, m/d/Y - H:i')); } $variables['categories'] = array(); foreach ($item->categories as $category) { $variables['categories'][$category->cid] = l($category->title, 'aggregator/categories/' . $category->cid); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!aggregator!aggregator.pages.inc/function/template_preprocess_aggregator_item/7.x