function ctools_form_comment_form_alter

Alter the comment form to get a little more control over it.

File

./ctools.module, line 739

Code

function ctools_form_comment_form_alter(&$form, &$form_state) {
    if (!empty($form_state['ctools comment alter'])) {
        // Force the form to post back to wherever we are.
        $form['#action'] = url($_GET['q'], array(
            'fragment' => 'comment-form',
        ));
        if (empty($form['#submit'])) {
            $form['#submit'] = array(
                'comment_form_submit',
            );
        }
        $form['#submit'][] = 'ctools_node_comment_form_submit';
    }
}