You are here

function feeds_delete_tab_form in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds.pages.inc \feeds_delete_tab_form()
  2. 7.2 feeds.pages.inc \feeds_delete_tab_form()
  3. 7 feeds.pages.inc \feeds_delete_tab_form()

Render a feeds delete form.

Used on both node pages and configuration pages. Therefore $node may be missing.

1 string reference to 'feeds_delete_tab_form'
feeds_menu in ./feeds.module
Implementation of hook_menu().

File

./feeds.pages.inc, line 125
Menu callbacks, form callbacks and helpers.

Code

function feeds_delete_tab_form(&$form_state, $importer_id, $node = NULL) {
  if (empty($node)) {
    $form['#redirect'] = 'import/' . $importer_id;
  }
  else {
    $importer_id = feeds_get_importer_id($node->type);
    $form['#feed_nid'] = $node->nid;
    $form['#redirect'] = 'node/' . $node->nid;
  }

  // Form cannot pass on feed object.
  $form['#importer_id'] = $importer_id;
  return confirm_form($form, t('Delete all items from feed?'), $form['#redirect'], '', t('Delete'), t('Cancel'), 'confirm feeds update');
}