'description' => 'Flag to indicate how users may control visibility of the block. (0 = Users cannot control, 1 = On by default, but can be hidden, 2 = Hidden by default, but can be shown)',
'description' => 'Flag to indicate how to show blocks on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)',
'description' => 'Contents of the "Pages" block; contains either a list of paths on which to include/exclude the block or PHP code, depending on "visibility" setting.',
'description' => 'Custom title for the block. (Empty string will use block default title, <none> will remove the title, text will cause block to use specified title.)',
'description' => 'Binary flag to indicate block cache mode. (-1: Do not cache, 1: Cache per role, 2: Cache per user, 4: Cache per page, 8: Block cache global) See BLOCK_CACHE_* constants in block.module for more detailed information.',
$schema['cache_block']['description'] = 'Cache table for the Block module to store already built blocks, identified by module, delta, and various contexts which may change the block, such as theme, locale, and caching mode defined for the block.';
// Add contact help block for themes, which had blocks.
$insert->values(array(
'module' => 'block',
'delta' => $bid,
'theme' => $theme,
'status' => 1,
'weight' => 5,
'region' => 'help',
'visibility' => 1,
'pages' => 'contact',
'cache' => -1,
));
}
drupal_set_message('The contact form information setting was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right.');
}
$insert->execute();
// Migrate user help setting.
if ($user_help = variable_get('user_registration_help', '')) {
// Add user registration help block for themes, which had blocks.
$insert->values(array(
'module' => 'block',
'delta' => $bid,
'theme' => $theme,
'status' => 1,
'weight' => 5,
'region' => 'help',
'visibility' => 1,
'pages' => 'user/register',
'cache' => -1,
));
}
drupal_set_message('The user registration guidelines were migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right.');
// Add mission block for themes, which had blocks.
$insert->values(array(
'module' => 'block',
'delta' => $bid,
'theme' => $theme,
'status' => 1,
'weight' => 0,
'region' => 'highlight',
'visibility' => 1,
'pages' => '<front>',
'cache' => -1,
));
}
drupal_set_message('The site mission was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to only show on the front page in the highlighted content region. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right. If your theme does not have a highlighted content region, you might need to <a href="' . url('admin/structure/block') . '">relocate the block</a>.');
$insert->execute();
// Migrate mission to RSS site description.
variable_set('feed_description', $mission);
}
// Migrate site footer message to a custom block.
if ($footer_message = variable_get('site_footer', '')) {
// Add site footer block for themes, which had blocks.
// Set low weight, so the block comes early (it used to be
// before the other blocks).
$insert->values(array(
'module' => 'block',
'delta' => $bid,
'theme' => $theme,
'status' => 1,
'weight' => -10,
'region' => 'footer',
'pages' => '',
'cache' => -1,
));
}
drupal_set_message('The footer message was migrated to <a href="' . url('admin/structure/block/manage/block/' . $bid . '/configure') . '">a custom block</a> and set up to appear in the footer. The block was set to use the default text format, which might differ from the HTML based format used before. Check the block and ensure that the output is right. If your theme does not have a footer region, you might need to <a href="' . url('admin/structure/block') . '">relocate the block</a>.');
$insert->execute();
}
// Remove the variables (even if they were saved empty on the admin interface),
// to avoid keeping clutter in the variables table.
variable_del('contact_form_information');
variable_del('user_registration_help');
variable_del('site_mission');
variable_del('site_footer');
// Rebuild theme data, so the new 'help' region is identified.