You are here

function context_form_comment_form_alter in Context 6

Same name and namespace in other branches
  1. 6.3 context.core.inc \context_form_comment_form_alter()
  2. 6.2 context.core.inc \context_form_comment_form_alter()
  3. 7.3 context.core.inc \context_form_comment_form_alter()

Implementation of hook_form_alter() for comment_form.

File

./context.core.inc, line 254

Code

function context_form_comment_form_alter(&$form, $form_state) {
  if ($nid = $form['nid']['#value']) {
    $node = node_load($nid);
    context_set_by_condition('node', $node->type);
  }
}