You are here

function addthis_customize_form_validate in AddThis 6.3

Validation function for addthis_customize_form().

Do not save definitions if they do not specify a code.

File

./addthis.admin.inc, line 381
Configuration settings for AddThis.

Code

function addthis_customize_form_validate($form, &$form_state) {
  foreach ($form_state['values']['addthis_service_customizations'] as $delta => $def) {
    if (empty($def['code'])) {
      unset($form_state['values']['addthis_service_customizations'][$delta]);
    }
  }
}