You are here

function author_pane_author_pane_content_type_render in Author Pane 6

Same name and namespace in other branches
  1. 6.2 plugins/content_types/author_pane.inc \author_pane_author_pane_content_type_render()

Output function for the 'author pane' content type.

File

plugins/content_types/author_pane.inc, line 26
This file provides a CTools content type containing the author pane.

Code

function author_pane_author_pane_content_type_render($subtype, $conf, $panel_args, $context) {
  $account = isset($context->data) ? drupal_clone($context->data) : NULL;
  $block = new stdClass();
  if ($account) {
    $block->title = check_plain($account->name);
    $block->content = theme('author_pane', $account, $conf['image_path'], $conf['template_file']);
  }
  else {
    $block->content = "User information not available";
  }
  return $block;
}