function submitted_by_comment_view in Submitted By 7
Implements hook_comment_view().
File
- ./
submitted_by.module, line 193 - Take over the "Submitted by" theme function.
Code
function submitted_by_comment_view($comment, $view_mode, $langcode) {
$fields = field_extra_fields_get_display('comment', $comment->node_type, $view_mode);
if (isset($fields['submitted_by']['visible']) && $fields['submitted_by']['visible']) {
$comment->content['submitted_by'] = array(
'#markup' => '<span class="submitted-by">' . submitted_by_do_replace($comment, '', 'comment') . '</span>',
);
}
else {
$comment->content['submitted_by'] = array(
array(),
);
}
}