function ctools_user_links_content_type_render
Output function for the user links.
File
-
plugins/
content_types/ user_context/ user_links.inc, line 26
Code
function ctools_user_links_content_type_render($subtype, $conf, $panel_args, $context) {
if (!empty($context) && empty($context->data)) {
return;
}
$account = clone $context->data;
$block = new stdClass();
$block->module = 'user';
$block->delta = $account->uid;
if (empty($account)) {
$block->delta = 'placeholder';
$block->subject = t('User name.');
$block->content = t('User links go here.');
}
else {
$block->subject = $account->name;
user_build_content($account, $conf['build_mode']);
if (!empty($account->content['links'])) {
$block->content = $account->content['links'];
}
else {
$block->content = '';
}
}
return $block;
}