function contact_preprocess_author_pane in Author Pane 7.2
Same name and namespace in other branches
- 5 modules/contact.author-pane.inc \contact_preprocess_author_pane()
- 6.2 modules/contact.author-pane.inc \contact_preprocess_author_pane()
- 6 modules/contact.author-pane.inc \contact_preprocess_author_pane()
Implements hook_preprocess_author_pane().
See also
_contact_personal_tab_acces()
File
- modules/
contact.author-pane.inc, line 12 - This file provides a preprocess function on behalf of the Contact module.
Code
function contact_preprocess_author_pane(&$variables) {
// Check if this preprocess needs to be run given who's calling it.
if (!author_pane_run_preprocess('contact', $variables['caller'])) {
return;
}
if (_contact_personal_tab_access($variables['account'])) {
$options = array(
'attributes' => array(
'class' => array(
'author-pane-link',
),
'title' => t('Send @accountname an email.', array(
'@accountname' => $variables['account']->name,
)),
),
'html' => TRUE,
);
$variables['contact'] = l('<span>' . t('Send Email') . '</span>', 'user/' . $variables['account']->uid . '/contact', $options);
}
}