You are here

function content_taxonomy_form_vocabulary_submit in Context 6.2

Form submission handler for the vocabulary add/edit form.

We store our context specific settings for the given vocabulary, this is so that people can choose to include specific taxonomies in the taxonomy condition form.

1 string reference to 'content_taxonomy_form_vocabulary_submit'
context_form_alter in ./context.core.inc
Implementation of hook_form_alter().

File

./context.core.inc, line 393

Code

function content_taxonomy_form_vocabulary_submit($form, &$form_state) {
  $context_vocabularies = variable_get('context_taxonomy_vocabularies', array());
  $vid = $form_state['values']['vid'];
  if ($form_state['values']['context']) {
    $context_vocabularies[$vid] = $vid;
  }
  else {
    unset($context_vocabularies[$vid]);
  }

  // Update the settings:
  variable_set('context_taxonomy_vocabularies', $context_vocabularies);
}