comment_confirm_delete

Definition

comment_confirm_delete(&$form_state, $comment)
modules/comment/comment.admin.inc, line 239

Description

Form builder; Builds the confirmation form for deleting a single comment.

See also

comment_confirm_delete_submit()

Related topics

Namesort iconDescription
Form builder functionsFunctions that build an abstract representation of a HTML form.

Code

<?php
function comment_confirm_delete(&$form_state, $comment) {
  $form = array();
  $form['#comment'] = $comment;
  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');
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.