You are here

function heartbeat_comments_delete_confirm in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 modules/heartbeat_comments/heartbeat_comments.module \heartbeat_comments_delete_confirm()

Confirmation page to delete a heartbeat comment.

Parameters

$form_state:

$hcid:

1 string reference to 'heartbeat_comments_delete_confirm'
heartbeat_comments_menu in modules/heartbeat_comments/heartbeat_comments.module
Implementation of hook_menu().

File

modules/heartbeat_comments/heartbeat_comments.module, line 861
heartbeat_comments.module Heartbeat comments can come with two possible

Code

function heartbeat_comments_delete_confirm(&$form_state, $hcid) {
  $path = isset($_GET['destination']) ? $_GET['destination'] : (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '<front>');
  $form = array(
    'hcid' => array(
      '#type' => 'hidden',
      '#value' => $hcid,
    ),
    'redirect_path' => array(
      '#type' => 'hidden',
      '#value' => $path,
    ),
  );
  return confirm_form($form, t('Are you sure you want to delete this comment?'), $path, t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}