function aggregator_remove

aggregator_remove($feed)

Removes all items from a feed.

Parameters

$feed: An object describing the feed to be cleared.

File

modules/aggregator/aggregator.module, line 567
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_remove($feed) {
  _aggregator_get_variables();
  // Call hook_aggregator_remove() on all modules.
  module_invoke_all('aggregator_remove', $feed);
  // Reset feed.
  db_update('aggregator_feed')
    ->condition('fid', $feed->fid)
    ->fields(array(
      'checked' => 0,
      'hash' => '',
      'etag' => '',
      'modified' => 0,
    ))
    ->execute();
}

© 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.module/function/aggregator_remove/7.x