You are here

function delete_all_bulk_delete_content in Delete all 5

Form function for bulk delete content page

1 string reference to 'delete_all_bulk_delete_content'
delete_all_menu in ./delete_all.module

File

./delete_all.module, line 49

Code

function delete_all_bulk_delete_content($form_values = array()) {
  $form_id = 'delete_all_bulk_delete_content';
  $form = array();

  //Fieldset for deleting taxonomy forms
  $form['taxonomy'] = array(
    '#type' => 'fieldset',
    '#access' => user_access('administer content'),
    '#title' => t('Delete Taxonomy Terms'),
    '#collapsible' => FALSE,
  );
  $form['taxonomy']['vocabulary'] = array(
    '#title' => t('Taxonomy Vocabulary'),
    '#type' => 'checkboxes',
    '#description' => t('Select which taxonomy vocabulary terms you wish to delete. This will not delete the vocabulary, only the terms within the vocabulary.'),
    '#options' => _delete_all_get_vocabulary(),
  );

  //Fieldset for deleting nodes
  $form['nodes'] = array(
    '#type' => 'fieldset',
    '#access' => user_access('administer content'),
    '#title' => t('Delete Nodes'),
    '#collapsible' => FALSE,
  );
  $form['nodes']['node_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Node types to delete'),
    '#description' => t('Select which node types you wish to delete'),
    '#options' => _delete_all_get_node_types(),
  );
  return confirm_form($form, t('Are you sure you wish to delete the content?'), 'admin/settings/bulk_delete', 'Are you sure you wish to delete the items?', t('Delete'), t('Cancel'), 'delete_all_bulk_delete_content_confirm');
}