node_form_delete_submit

Versions
6 – 7
node_form_delete_submit($form, &$form_state)

Button sumit function: handle the 'Delete' button on the node form.

Code

modules/node/node.pages.inc, line 305

<?php
function node_form_delete_submit($form, &$form_state) {
  $destination = '';
  if (isset($_REQUEST['destination'])) {
    $destination = drupal_get_destination();
    unset($_REQUEST['destination']);
  }
  $node = $form['#node'];
  $form_state['redirect'] = array('node/'. $node->nid .'/delete', $destination);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.