You are here

function blocktheme_save in Block Theme 5

Same name and namespace in other branches
  1. 8 blocktheme.module \blocktheme_save()
  2. 6 blocktheme.module \blocktheme_save()
  3. 7 blocktheme.module \blocktheme_save()

File

./blocktheme.module, line 81

Code

function blocktheme_save($form_id, $form_values) {
  $var_name = $form_values['module'] . '-' . $form_values['delta'];
  $blocktheme = blocktheme_get();
  if (!$form_values['blocktheme']) {
    unset($blocktheme[$var_name]);
  }
  else {
    $blocktheme[$var_name] = $form_values['blocktheme'];
  }
  blocktheme_set($blocktheme);
}