You are here

function blog_user in Drupal 4

Same name and namespace in other branches
  1. 5 modules/blog/blog.module \blog_user()
  2. 6 modules/blog/blog.module \blog_user()

Implementation of hook_user().

File

modules/blog.module, line 42
Enables keeping an easily and regularly updated web page or a blog.

Code

function blog_user($type, &$edit, &$user) {
  if ($type == 'view' && user_access('edit own blog', $user)) {
    $items[] = array(
      'title' => t('Blog'),
      'value' => l(t('view recent blog entries'), "blog/{$user->uid}", array(
        'title' => t("Read %username's latest blog entries.", array(
          '%username' => $user->name,
        )),
      )),
      'class' => 'blog',
    );
    return array(
      t('History') => $items,
    );
  }
}