You are here

function fb_graph_taxonomy_form_vocabulary_submit in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb_graph.module \fb_graph_taxonomy_form_vocabulary_submit()

Form API submit handler.

Save settings for each vocabulary.

1 string reference to 'fb_graph_taxonomy_form_vocabulary_submit'
fb_graph_form_alter in ./fb_graph.module

File

./fb_graph.module, line 315
Open Graph Helpers

Code

function fb_graph_taxonomy_form_vocabulary_submit($form, &$form_state) {
  $values = $form_state['values'];
  if (!empty($values['fb_graph_is_metadata'])) {
    variable_set('fb_graph_is_metadata_' . $values['vid'], $values['fb_graph_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_graph_is_metadata_' . $values['vid']);
  }
}