You are here

function user_badges_block_save in User Badges 7.2

Same name and namespace in other branches
  1. 6.2 user_badges.module \user_badges_block_save()
  2. 6 user_badges.module \user_badges_block_save()
  3. 7 user_badges.module \user_badges_block_save()
  4. 7.3 user_badges.module \user_badges_block_save()

Implements hook_block_save().

File

./user_badges.module, line 1336
@brief User Badges module file

Code

function user_badges_block_save($delta = 0, $edit = array()) {
  switch ($delta) {
    case 'current_node':
      variable_set('user_badges_current_node_types', array_filter($edit['types']));
      drupal_set_message(t('Configuration saved.'));
      return;
    case 'my_badges':
      variable_set('user_badges_my_badges_limit', $edit['limit']);
      drupal_set_message(t('Configuration saved.'));
      return;
  }
}