function microdata_form_taxonomy_form_vocabulary_alter in Microdata 7
Implements hook_form_FORMID_alter().
Adds microdata options to vocabulary form.
See also
File
- includes/
microdata.form_alter.inc, line 44 - Provides inline structured data using Microdata format.
Code
function microdata_form_taxonomy_form_vocabulary_alter(&$form, $form_state, $edit = array()) {
module_load_include('inc', 'microdata', 'microdata.admin');
$form['microdata'] = array(
'#type' => 'fieldset',
'#title' => t('Term microdata settings'),
'#collapsible' => TRUE,
'#group' => 'additional_settings',
'#tree' => TRUE,
);
$entity_type = 'taxonomy_term';
$bundle_type = $form['#vocabulary']->machine_name;
$mapping = microdata_get_mapping($entity_type, $bundle_type);
$form['microdata'][$entity_type] = array(
'#type' => 'container',
);
// Add the bundle mapping fields into the vertical tab.
$form['microdata'][$entity_type] = array_merge($form['microdata'][$entity_type], microdata_get_bundle_type_mapping_form($mapping, $entity_type, $bundle_type));
// Add the submit handler.
$form['#submit'] = array_merge($form['#submit'], array(
'microdata_bundle_type_mapping_form_submit',
));
}