You are here

function theme_blockreference_formatter_title in Block reference 7

Same name and namespace in other branches
  1. 6 blockreference.module \theme_blockreference_formatter_title()
  2. 7.2 blockreference.module \theme_blockreference_formatter_title()

Theme function for 'title' blockreference field formatter.

File

./blockreference.module, line 828
Defines a field type for referencing a block from a node.

Code

function theme_blockreference_formatter_title($variables) {
  $element =& $variables['element'];
  $output = '';
  $block = blockreference_formatter_get_block($element);
  if ($block) {
    if ($block_content = _block_render_blocks(array(
      $block,
    ))) {
      $rendered_block = reset($block_content);
      $output = $rendered_block->subject;
    }
  }
  return $output;
}