template_preprocess_user_profile
modules/user/user.pages.inc, строка 179
- Версии
- 6
template_preprocess_user_profile(&$variables)
Обрабатывает переменные для user-profile.tpl.php.
Массив $variables
содержит следующие аргументы:
$account
См. также
Код
<?php
function template_preprocess_user_profile(&$variables) {
$variables['profile'] = array();
// Sort sections by weight
uasort($variables['account']->content, 'element_sort');
// Provide keyed variables so themers can print each section independantly.
foreach (element_children($variables['account']->content) as $key) {
$variables['profile'][$key] = drupal_render($variables['account']->content[$key]);
}
// Collect all profiles to make it easier to print all items at once.
$variables['user_profile'] = implode($variables['profile']);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии