The title says the whole thing. :-)
Actual code for this action is quite simple like this (taken from http://drupal.org/project/mini):

/**
 * Implementation of hook_menu_alter().
 */
function mymodule_menu_alter(&$callbacks) {

  // Move "Delete" button to local tasks instead of node edit form
  if (isset($callbacks['node/%node/delete'])) {
    $callbacks['node/%node/delete']['type'] = MENU_LOCAL_TASK;
    $callbacks['node/%node/delete']['weight'] = 2; // make sure it is after Edit
  }
}

/**
 * Implementation of hook_form_alter().
 */
function mymodule_form_alter(&$form, $form_state, $form_id) {

  // Move "Delete" button to local tasks instead of node edit form
  if (empty($form_state['submitted'])) {
    if (strcmp(substr($form_id, -10), '_node_form') == 0) {
      unset($form['buttons']['delete']);
    }
  }
}

Comments

lelizondo’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Will this approach includes the option to do this different for every content type defined?

lelizondo’s picture

Status: Active » Postponed (maintainer needs more info)
astanley86’s picture

Where would one paste this code to get it working? It's not doing anything in my template.php file. Thanks!

lelizondo’s picture

You need to create your own module.

astanley86’s picture

Okay I created my own module and enabled it but it doesn't seem to have done anything. This will remove the 'delete' button on node edit forms, correct? There was no option in the "node form settings" of my content type..

Thanks!

lelizondo’s picture

There will be no option in the settings.

If you're having problems, please use the Mini module, I understand it does exactly what you need.

SeanBannister’s picture

If anyone needs a D7 solution because Mini is currently only D6 check out the Jammer module.

kssundar’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (won't fix)

This is not a setting but a direct change.