You are here

function contact_preprocess_author_pane in Author Pane 5

Same name and namespace in other branches
  1. 6.2 modules/contact.author-pane.inc \contact_preprocess_author_pane()
  2. 6 modules/contact.author-pane.inc \contact_preprocess_author_pane()
  3. 7.2 modules/contact.author-pane.inc \contact_preprocess_author_pane()

Implementation of hook_preprocess_author_pane().

File

modules/contact.author-pane.inc, line 11
This file provides a preprocess function on behalf of the contact module.

Code

function contact_preprocess_author_pane(&$variables) {
  global $user;
  $account = $variables['account'];
  $account_id = $account->uid;
  $image_path = $variables['image_path'];
  if ($account->contact && $account_id != $user->uid && $user->uid != 0) {
    $variables['contact'] = l(theme('image', "{$image_path}/contact.png", t('Contact user'), t('Contact user'), NULL, TRUE), "user/{$account_id}/contact", array(), NULL, NULL, FALSE, TRUE);
    $variables['contact_link'] = l("Contact user", "user/{$account_id}/contact");
  }
}