You are here

function fb_opengraph_taxonomy_form_vocabulary_submit in Drupal for Facebook 7.4

Form API submit handler.

Save settings for each vocabulary.

1 string reference to 'fb_opengraph_taxonomy_form_vocabulary_submit'
fb_opengraph_form_alter in ./fb_opengraph.module

File

./fb_opengraph.module, line 318
Open Graph Helpers

Code

function fb_opengraph_taxonomy_form_vocabulary_submit($form, &$form_state) {
  $values = $form_state['values'];
  if (!empty($values['fb_opengraph_is_metadata'])) {
    variable_set('fb_opengraph_is_metadata_' . $values['vid'], $values['fb_opengraph_is_metadata']);
  }
  else {

    // Delete rather than set to FALSE, because some sites will have huge numbers of vocabs.  We only need data for the few that correspond to open graph types.
    variable_del('fb_opengraph_is_metadata_' . $values['vid']);
  }
}