blog_user
modules/blog/blog.module, строка 46
- Версии
- 5 – 6
blog_user($type, &$edit, &$user)
Реализация hook_user()
.
Код
<?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'),
// l() escapes the attributes, so we should not escape !username here.
'#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'),
);
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии