You are here

function delete_all_menu in Delete all 5

Same name and namespace in other branches
  1. 6 delete_all.module \delete_all_menu()
  2. 7 delete_all.module \delete_all_menu()

File

./delete_all.module, line 3

Code

function delete_all_menu($maycache) {
  $items = array();
  $items[] = array(
    'path' => 'admin/content/delete_content',
    'title' => t('Delete all content'),
    'description' => t('Delete all nodes and comments on this site. This is useful for development sites, or prior to launching the site. Otherwise it destroys all data on a site.'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'delete_all_content',
    ),
    'access' => user_access('administer nodes'),
    'type' => MENU_NORMAL_ITEM,
  );
  $items[] = array(
    'path' => 'admin/user/delete_users',
    'title' => t('Delete all users'),
    'description' => t('Delete all users on this site. This is useful for development sites, or prior to launching the site. Otherwise it destroys all data on a site.'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'delete_all_users',
    ),
    'access' => user_access('administer users'),
    'type' => MENU_NORMAL_ITEM,
  );

  // Bulk Delete Form
  $items[] = array(
    'path' => 'admin/settings/bulk_delete',
    'title' => t('Bulk delete'),
    'description' => t('Bulk deletes nodes, taxonomy terms and users based on the their types.'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'delete_all_bulk_delete_content',
    ),
    'access' => user_access('administer content'),
    'type' => MENU_NORMAL_ITEM,
  );

  // Bulk Delete Complete
  $items[] = array(
    'title' => t('Items Deleted'),
    'path' => 'admin/settings/bulk_delete/complete',
    'callback' => 'delete_all_bulk_delete_content_complete',
    'type' => MENU_CALLBACK,
    'access' => user_access('administer content'),
  );
  return $items;
}