function better_comments_edit_cancel in Better Comments 7
Same name and namespace in other branches
- 7.2 better_comments.module \better_comments_edit_cancel()
Cancel the edit comment form.
1 string reference to 'better_comments_edit_cancel'
- better_comments_menu in ./
better_comments.module - Implements hook_menu().
File
- ./
better_comments.module, line 207 - Better Comments provides option to configure the comment system.
Code
function better_comments_edit_cancel($cid) {
$comment = comment_load($cid);
$node = node_load($comment->nid);
$comment = comment_view($comment, $node);
unset($comment['#prefix']);
unset($comment['#suffix']);
$form = drupal_render($comment);
$commands[] = ajax_command_replace('.comment-inner-' . $cid, $form);
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}