You are here

function delta_blocks_block_save in Delta 7.3

Implements hook_block_save().

File

delta_blocks/delta_blocks.module, line 80
Exposes a number of core Drupal elements as blocks.

Code

function delta_blocks_block_save($delta = '', $edit = array()) {
  switch ($delta) {
    case 'branding':
      variable_set('delta_blocks_branding_site_name_hidden', $edit['delta_blocks_branding_site_slogan_hidden']);
      variable_set('delta_blocks_branding_site_slogan_hidden', $edit['delta_blocks_branding_site_slogan_hidden']);
      variable_set('delta_blocks_branding_logo_linked', $edit['delta_blocks_branding_logo_linked']);
      variable_set('delta_blocks_branding_logo_render', $edit['delta_blocks_branding_logo_render']);
      variable_set('delta_blocks_branding_site_name_linked', $edit['delta_blocks_branding_site_name_linked']);
      break;
    case 'site-name':
      variable_set('delta_blocks_site_name_linked', $edit['delta_blocks_site_name_linked']);
      variable_set('delta_blocks_site_name_hidden', $edit['delta_blocks_site_name_hidden']);
      break;
    case 'site-slogan':
      variable_set('delta_blocks_site_slogan_hidden', $edit['delta_blocks_site_slogan_hidden']);
      break;
    case 'page-title':
      variable_set('delta_blocks_page_title_hidden', $edit['delta_blocks_page_title_hidden']);
      break;
    case 'logo':
      variable_set('delta_blocks_logo_linked', $edit['delta_blocks_logo_linked']);
      break;
    case 'breadcrumb':
      variable_set('delta_blocks_breadcrumb_title_hidden', $edit['delta_blocks_breadcrumb_title_hidden']);
      variable_set('delta_blocks_breadcrumb_current', $edit['delta_blocks_breadcrumb_current']);
      break;
  }
}