function theme_blockreference_formatter_default in Block reference 7.2
Same name and namespace in other branches
- 6 blockreference.module \theme_blockreference_formatter_default()
- 7 blockreference.module \theme_blockreference_formatter_default()
Theme function for 'default' blockreference field formatter.
File
- ./
blockreference.module, line 142
Code
function theme_blockreference_formatter_default($variables) {
$element = $variables['element'];
$block = _blockreference_formatter_get_block($element);
if ($block) {
$bid = $block->module . '_' . $block->delta;
if (!isset($block->title)) {
$block->title = '';
}
if (!isset($block->region)) {
$block->region = 'none';
}
$block_content = _block_render_blocks(array(
$block,
));
$build = _block_get_renderable_array($block_content);
$build[$bid]['#blockreference_element'] = $element;
return drupal_render($build);
}
return '';
}