template_preprocess_profile_block
- Versions
- 6 – 7
template_preprocess_profile_block(&$variables)
Process variables for profile-block.tpl.php.
The $variables array contains the following arguments:
- $account
- $fields
See also
Code
modules/profile/profile.module, line 486
<?php
function template_preprocess_profile_block(&$variables) {
$variables['picture'] = theme('user_picture', $variables['account']);
$variables['profile'] = array();
// Supply filtered version of $fields that have values.
foreach ($variables['fields'] as $field) {
if ($field->value) {
$variables['profile'][$field->name]->title = check_plain($field->title);
$variables['profile'][$field->name]->value = $field->value;
$variables['profile'][$field->name]->type = $field->type;
}
}
}
?>Login or register to post comments 