Issue #1373312 by sun: Assign system_main() block to 'content' region and help block to 'help' region by default.

8.0.x
catch 2012-02-20 14:41:29 +09:00
parent 78d1b495c7
commit 859fdb931e
2 changed files with 17 additions and 8 deletions

View File

@ -66,14 +66,16 @@
* Most modules do not provide an initial value, and any value provided can
* be modified by a user on the block configuration screen.
* - 'status': (optional) Initial value for block enabled status. (1 =
* enabled, 0 = disabled). Most modules do not provide an initial value,
* and any value provided can be modified by a user on the block
* configuration screen.
* enabled, 0 = disabled). An initial value for 'region' is required for
* 'status' to take effect.
* Most modules do not provide an initial value, and any value provided can
* be modified by a user on the block configuration screen.
* - 'region': (optional) Initial value for theme region within which this
* block is set. Most modules do not provide an initial value, and
* any value provided can be modified by a user on the block configuration
* screen. Note: If you set a region that isn't available in the currently
* enabled theme, the block will be disabled.
* block is set. If the specified region is not available in a theme, the
* block will be disabled. The initial value for 'status' must be enabled or
* the initial region value is ignored.
* Most modules do not provide an initial value, and any value provided can
* be modified by a user on the block configuration screen.
* - 'visibility': (optional) Initial value for the visibility flag, which
* tells how to interpret the 'pages' value. Possible values are:
* - BLOCK_VISIBILITY_NOTLISTED: Show on all pages except listed pages.

View File

@ -2035,8 +2035,12 @@ function system_user_timezone(&$form, &$form_state) {
function system_block_info() {
$blocks['main'] = array(
'info' => t('Main page content'),
// Cached elsewhere.
// Cached elsewhere.
'cache' => DRUPAL_NO_CACHE,
// Auto-enable in 'content' region by default, which always exists.
// @see system_themes_page(), drupal_render_page()
'region' => 'content',
'status' => 1,
);
$blocks['powered-by'] = array(
'info' => t('Powered by Drupal'),
@ -2047,6 +2051,9 @@ function system_block_info() {
'info' => t('System help'),
'weight' => '5',
'cache' => DRUPAL_NO_CACHE,
// Auto-enable in 'help' region by default, if the theme defines one.
'region' => 'help',
'status' => 1,
);
// System-defined menu blocks.
foreach (menu_list_system_menus() as $menu_name => $title) {