On this page
function comment_confirm_delete
comment_confirm_delete($form, &$form_state, $comment)
Form builder; Builds the confirmation form for deleting a single comment.
See also
comment_confirm_delete_submit()
Related topics
File
- modules/comment/comment.admin.inc, line 257
- Admin page callbacks for the comment module.
Code
function comment_confirm_delete($form, &$form_state, $comment) {
$form['#comment'] = $comment;
// Always provide entity id in the same form key as in the entity edit form.
$form['cid'] = array('#type' => 'value', '#value' => $comment->cid);
return confirm_form(
$form,
t('Are you sure you want to delete the comment %title?', array('%title' => $comment->subject)),
'node/' . $comment->nid,
t('Any replies to this comment will be lost. This action cannot be undone.'),
t('Delete'),
t('Cancel'),
'comment_confirm_delete');
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.admin.inc/function/comment_confirm_delete/7.x