aggregator_refresh
Definition
aggregator_refresh($feed)
modules/aggregator/aggregator.module, line 530
Description
Checks a news feed for new items.
Parameters
$feed An object describing the feed to be refreshed.
Code
<?php
function aggregator_refresh($feed) {
// Fetch the feed.
$fetcher = variable_get('aggregator_fetcher', 'aggregator');
module_invoke($fetcher, 'aggregator_fetch', $feed);
if ($feed->source_string !== FALSE) {
// Parse the feed.
$parser = variable_get('aggregator_parser', 'aggregator');
module_invoke($parser, 'aggregator_parse', $feed);
// If there are items on the feed, let all enabled processors do their work on it.
if (@count($feed->items)) {
$processors = variable_get('aggregator_processors', array('aggregator'));
foreach ($processors as $processor) {
module_invoke($processor, 'aggregator_process', $feed);
}
}
}
// Expire old feed items.
if (drupal_function_exists('aggregator_expire')) {
aggregator_expire($feed);
}
}
?> 