template_preprocess_profile_block

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/profile/profile.module, строка 486

Версии
6
template_preprocess_profile_block(&$variables)

Process variables for profile-block.tpl.php.

The $variables array contains the following arguments:

  • $account
  • $fields

See also

profile-block.tpl.php

Код

<?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;
    }
  }

}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему