You are here

function date_tools_wizard_create_blocks in Date 6.2

Same name and namespace in other branches
  1. 7 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 487
Date Wizard code.

Code

function date_tools_wizard_create_blocks($type_name) {

  // 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 = 'left';
  $block->title = '';
  $block->module = 'calendar';
  $block->delta = 0;
  date_tools_wizard_add_block($block);

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

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