Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / user_view.twig
1 /**
2  * Implements hook_user_view().
3  */
4 function {{ machine_name }}_user_view($account, $view_mode, $langcode) {
5   if (user_access('create blog content', $account)) {
6     $account->content['summary']['blog'] =  array(
7       '#type' => 'user_profile_item',
8       '#title' => t('Blog'),
9       '#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)))))),
10       '#attributes' => array('class' => array('blog')),
11     );
12   }
13 }