You are here

function image_hotspots_add_row in Image Hotspots 7.2

Adds new color row into form.

1 string reference to 'image_hotspots_add_row'
image_hotspots_style_config in includes/image_hotspots.admin.inc
Builds Hotspots-style configuration form.

File

includes/image_hotspots.admin.inc, line 96
Admin configuration for module.

Code

function image_hotspots_add_row($form, $form_state) {
  foreach ($form_state['values']['hotspot_style'] as $row => $value) {
    if (empty($value['color']) && (empty($value['border']['color']) || intval($value['border']['width']) == 0) && $row != count($form_state['values']['hotspot_style'])) {
      unset($form['hotspot_style'][$row]);
    }
  }
  return $form['hotspot_style'];
}