1 views_handler_field_comment_username.inc | views_handler_field_comment_username::render_link($data, $values) |
File
- core/
modules/ comment/ views/ views_handler_field_comment_username.inc, line 37 - Definition of views_handler_field_comment_username.
Class
- views_handler_field_comment_username
- Field handler to allow linking to a user account or homepage.
Code
function render_link($data, $values) {
if (!empty($this->options['link_to_user'])) {
$account = new stdClass();
$account->uid = $this->get_value($values, 'uid');
$account->name = $this->get_value($values);
$account->homepage = $this->get_value($values, 'homepage');
return theme('username', array(
'account' => $account
));
}
else {
return $data;
}
}