Form constructor for the node deletion confirmation form.
function node_delete_confirm($form, &$form_state, $node) {
$form['#node'] = $node;
// Always provide entity id in the same form key as in the entity edit form.
$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,
)), 'node/' . $node->nid, t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}