function author_pane_author_pane_content_type_render in Author Pane 6.2
Same name and namespace in other branches
- 6 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) {
// Use the Real Name module if installed. Otherwise just the plain,
// unthemed user name for the title since we don't want it linked.
if (module_exists('realname')) {
$block->title = theme('username', $account, array(
'plain' => TRUE,
));
}
else {
$block->title = check_plain($account->name);
}
$block->content = theme('author_pane', $account, $conf['caller'], $conf['picture_preset']);
}
else {
$block->content = "User information not available";
}
return $block;
}