book_form_node_delete_confirm_alter
- Versions
- 6 – 7
book_form_node_delete_confirm_alter(&$form, $form_state)
Form altering function for the confirm form for a single node deletion.
Code
modules/book/book.module, line 756
<?php
function book_form_node_delete_confirm_alter(&$form, $form_state) {
$node = node_load($form['nid']['#value']);
if (isset($node->book) && $node->book['has_children']) {
$form['book_warning'] = array(
'#value' => '<p>'. t('%title is part of a book outline, and has associated child pages. If you proceed with deletion, the child pages will be relocated automatically.', array('%title' => $node->title)) .'</p>',
'#weight' => -10,
);
}
}
?>Login or register to post comments 