function blog_user_view

Implements hook_user_view().

File

drupal/modules/blog/blog.module, line 24
Enables multi-user blogs.

Code

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',
        ),
      ),
    );
  }
}