function node_multiple_delete_confirm_submit in Drupal 7
Same name and namespace in other branches
- 4 modules/node.module \node_multiple_delete_confirm_submit()
- 5 modules/node/node.module \node_multiple_delete_confirm_submit()
- 6 modules/node/node.admin.inc \node_multiple_delete_confirm_submit()
Form submission handler for node_multiple_delete_confirm().
See also
node_multiple_delete_confirm()
1 string reference to 'node_multiple_delete_confirm_submit'
- node_multiple_delete_confirm in modules/
node/ node.admin.inc - Multiple node deletion confirmation form for node_admin_content().
File
- modules/
node/ node.admin.inc, line 703 - Content administration and module settings UI.
Code
function node_multiple_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
node_delete_multiple(array_keys($form_state['values']['nodes']));
cache_clear_all();
$count = count($form_state['values']['nodes']);
watchdog('content', 'Deleted @count posts.', array(
'@count' => $count,
));
drupal_set_message(format_plural($count, 'Deleted 1 post.', 'Deleted @count posts.'));
}
$form_state['redirect'] = 'admin/content';
}