function microdata_vocabulary_settings_submit in Microdata 7
Submit callback; Caches microdata vocabularies.
File
- ./
microdata.admin.inc, line 46 - Microdata administration and module settings UI.
Code
function microdata_vocabulary_settings_submit($form, &$form_state) {
$vocabulary_info = microdata_get_vocabulary_info();
microdata_vocabulary_settings_refresh_vocabulary_cache($form, $form_state, FALSE);
$enabled_vocabs = array();
if (isset($form_state['values']['enabled_vocabs'])) {
$enabled_vocabs = array_filter($form_state['values']['enabled_vocabs']);
}
foreach ($enabled_vocabs as $vocab_name) {
drupal_set_message(t('The %vocab vocabulary has been enabled.', array(
'%vocab' => $vocabulary_info[$vocab_name]['label'],
)));
}
variable_set('microdata_enabled_vocabularies', $enabled_vocabs);
}