You are here

function date_tools_wizard_create_blocks in Date 7

Same name and namespace in other branches
  1. 6.2 date_tools/date_tools.wizard.inc \date_tools_wizard_create_blocks()
1 call to date_tools_wizard_create_blocks()
date_tools_wizard_build in date_tools/date_tools.wizard.inc

File

date_tools/date_tools.wizard.inc, line 425

Code

function date_tools_wizard_create_blocks($bundle, $region) {

  // Add calendar blocks to the default theme.
  $current_theme = variable_get('theme_default', 'garland');

  // Legend block.
  $block = new stdClass();
  $block->theme = $current_theme;
  $block->status = 1;
  $block->weight = -1;
  $block->region = $region;
  $block->title = '';
  $block->module = 'calendar';
  $block->delta = 0;
  $block->pages = '';
  $block->status = 1;
  date_tools_wizard_add_block($block);

  // Mini calendar block.
  $block->module = 'views';
  $block->delta = 'calendar_' . $bundle . '-calendar_block_1';
  date_tools_wizard_add_block($block);

  // Upcoming events block.
  $block->module = 'views';
  $block->delta = 'calendar_' . $bundle . '-block_1';
  date_tools_wizard_add_block($block);
  return;
}