Same name and namespace in other branches
  1. 4.7.x modules/node.module \node_delete_confirm()
  2. 5.x modules/node/node.module \node_delete_confirm()
  3. 7.x modules/node/node.pages.inc \node_delete_confirm()

Menu callback -- ask for confirmation of node deletion

1 string reference to 'node_delete_confirm'
node_menu in modules/node/node.module
Implementation of hook_menu().

File

modules/node/node.pages.inc, line 500
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

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'));
}