_feedapi_invoke_purge

Versions
5 – 6
_feedapi_invoke_purge(&$feed, $param)

Helper function for feedapi_invoke(). Delete all feed items of a feed.

Code

contributions/feedapi/feedapi.module, line 1316

<?php
function _feedapi_invoke_purge(&$feed, $param) {
  $node = node_load($feed->nid);

  if ($param == 'items') {
    return drupal_get_form('feedapi_purge_confirm', $node);
  }

  // Delete items from the processors
  foreach ($feed->processors as $processor) {
    // FIXME: it's possible now to accidentally delete an item from another processor
    module_invoke($processor, 'feedapi_item', 'purge', $feed);
  }

  // Closing step: Call after purge hook
  foreach (module_implements('feedapi_after_purge') as $module) {
    $func = $module .'_feedapi_after_purge';
    $func($feed);
  }

  // Reset hash.
  db_query("UPDATE {feedapi} SET hash = 0 WHERE nid = %d", $feed->nid);
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.