function content_taxonomy_options_widget in Content Taxonomy 6
Same name and namespace in other branches
- 5 content_taxonomy_options.module \content_taxonomy_options_widget()
- 6.2 content_taxonomy_options.module \content_taxonomy_options_widget()
Implementation of hook_widget().
File
- ./
content_taxonomy_options.module, line 80 - Defines a widget type for content_taxonomy for options
Code
function content_taxonomy_options_widget(&$form, &$form_state, $field, $items, $delta = NULL) {
$element = array(
'#type' => $field['widget']['type'] == 'content_taxonomy_select' ? 'optionwidgets_select' : 'optionwidgets_buttons',
'#default_value' => !empty($items) ? $items : array(),
);
return $element;
}