Implements hook_user_view().
function blog_user_view($account) {
if (user_access('create blog content', $account)) {
$account->content['summary']['blog'] = array(
'#type' => 'user_profile_item',
'#title' => t('Blog'),
// l() escapes the attributes, so we should not escape !username here.
'#markup' => l(t('View recent blog entries'), "blog/{$account->uid}", array(
'attributes' => array(
'title' => t("Read !username's latest blog entries.", array(
'!username' => format_username($account),
)),
),
)),
'#attributes' => array(
'class' => array(
'blog',
),
),
);
}
}