You are here

function userpoints_field_extra_fields in User Points 7.2

Same name and namespace in other branches
  1. 7 userpoints.module \userpoints_field_extra_fields()

Implements hook_field_extra_fields().

File

./userpoints.module, line 813

Code

function userpoints_field_extra_fields() {
  $extra['user']['user'] = array(
    'display' => array(
      'userpoints' => array(
        'label' => t('!Points', userpoints_translation()),
        'description' => t('!Points related information and actions.', userpoints_translation()),
        'weight' => 0,
      ),
    ),
  );
  $extra['userpoints_transaction']['userpoints_transaction'] = array(
    'form' => array(
      'txn_points' => array(
        'label' => t('Transaction user'),
        'description' => t('The user of the transaction'),
        'weight' => -20,
      ),
      'points' => array(
        'label' => t('!Points', userpoints_translation()),
        'description' => t('!Points amount of the transaction', userpoints_translation()),
        'weight' => -15,
      ),
    ),
  );
  if (module_exists('taxonomy') && count(userpoints_get_categories()) > 1) {
    $extra['userpoints_transaction']['userpoints_transaction']['form']['tid'] = array(
      'label' => t('Category'),
      'description' => t('Category of the transaction'),
      'weight' => 0,
    );
  }

  /*$extra['userpoints_transaction']['userpoints_transaction']['form']['additional_settings'] = array(
      'label' => t('Additional settings'),
      'description' => t('Additional settings'),
      'weight' => 20,
    );*/
  return $extra;
}