You are here

function google_authorship_user_view in Google Authorship 7.2

Implements hook_user_view().

Add rel="me" to user page if the the link to author's user page as bio option has been enabled.

File

./google_authorship.module, line 109
A module to display Google+ profile pictures of node authors in Google search results.

Code

function google_authorship_user_view($account, $view, $langcode) {
  if ($view == 'full' && ($google_id = google_authorship_get_google_id($account->uid))) {
    $element = array(
      '#tag' => 'link',
      '#attributes' => array(
        'href' => GOOGLE_AUTHORSHIP_PREFIX . $google_id,
        'rel' => 'me',
      ),
    );
    drupal_add_html_head($element, 'google_authorship_head_link');
  }
}