summaryrefslogtreecommitdiff
path: root/modules/block/block.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/block/block.module')
-rw-r--r--modules/block/block.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/block/block.module b/modules/block/block.module
index 3e1e83cca..70dcc8e00 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -277,10 +277,10 @@ function block_get_blocks_by_region($region) {
$build[$key] = $block->content;
unset($block->content);
$build[$key] += array(
- '#theme_wrappers' => array('block'),
'#block' => $block,
'#weight' => ++$weight,
);
+ $build[$key]['#theme_wrappers'][] ='block';
}
$build['#sorted'] = TRUE;
}
@@ -735,7 +735,9 @@ function _block_render_blocks($region_blocks) {
}
if (isset($block->content) && $block->content) {
// Normalize to the drupal_render() structure.
- $block->content = array('content' => is_string($block->content) ? array('#markup' => $block->content) : $block->content);
+ if (is_string($block->content)) {
+ $block->content = array('#markup' => $block->content);
+ }
// Override default block title if a custom display title is present.
if ($block->title) {
// Check plain here to allow module generated titles to keep any