node_delete_confirm

Versions
4.7
node_delete_confirm()
5
node_delete_confirm($node)
6
node_delete_confirm(&$form_state, $node)
7
node_delete_confirm($form, &$form_state, $node)

Menu callback -- ask for confirmation of node deletion

Code

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

<?php
function node_delete_confirm(&$form_state, $node) {
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );

  return confirm_form($form,
    t('Are you sure you want to delete %title?', array('%title' => $node->title)),
    isset($_GET['destination']) ? $_GET['destination'] : 'node/'. $node->nid,
    t('This action cannot be undone.'),
    t('Delete'),
    t('Cancel')
  );
}
?>
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.