blog_user

Definition

blog_user($type, &$edit, &$user)
modules/blog/blog.module, line 46

Description

Implementation of hook_user().

Code

<?php
function blog_user($type, &$edit, &$user) {
  if ($type == 'view' && user_access('create blog entries', $user)) {
    $user->content['summary']['blog'] =  array(
      '#type' => 'user_profile_item',
      '#title' => t('Blog'),
      '#value' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read @username's latest blog entries.", array('@username' => $user->name))))),
      '#attributes' => array('class' => 'blog'),
    );
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.