You are here

function addthis_block_save in AddThis 7.4

Implements hook_block_save().

@todo Refactor settings save validation to appropriate class/method. There should come classes for each render type that also handle the saving of the settings data.

File

includes/addthis.block.inc, line 62
Block related hook implementations for the AddThis-module.

Code

function addthis_block_save($delta = '', $edit = array()) {
  variable_set(AddThis::BLOCK_WIDGET_TYPE_KEY, $edit['addthis_settings']['type']);
  if ($edit['addthis_settings']['type'] != 'addthis_disabled') {
    variable_set(AddThis::BLOCK_WIDGET_SETTINGS_KEY, $edit['addthis_settings']['settings']);
  }
}