function image_hotspots_form_field_ui_submit in Image Hotspots 7.2
Save field name with hotspots.
1 string reference to 'image_hotspots_form_field_ui_submit'
File
- ./
image_hotspots.module, line 125 - Main function of module.
Code
function image_hotspots_form_field_ui_submit($form, $form_state) {
$hotspot_fields = variable_get('image_hotspot_fields', array());
$content_type = $form_state['values']['instance']['bundle'];
$field_name = $form_state['values']['instance']['field_name'];
if ($form_state['values']['instance']['settings']['image_hotspot']) {
$hotspot_settings = $form_state['values']['instance']['settings']['image_hotspot_settings'];
$hotspot_fields[$content_type][$field_name] = array(
'field' => $field_name,
'settings' => array(
'min_width' => $hotspot_settings['min_resolution']['image_hotspots_min_width'],
'min_height' => $hotspot_settings['min_resolution']['image_hotspots_min_height'],
'max_width' => $hotspot_settings['max_resolution']['image_hotspots_max_width'],
'max_height' => $hotspot_settings['max_resolution']['image_hotspots_max_height'],
'linkable' => $hotspot_settings['linkable'],
),
);
variable_set('image_hotspot_fields', $hotspot_fields);
}
elseif (isset($hotspot_fields[$content_type][$field_name])) {
unset($hotspot_fields[$content_type][$field_name]);
variable_set('image_hotspot_fields', $hotspot_fields);
}
}