You are here

function userpoints_get_list_header in User Points 7

Same name and namespace in other branches
  1. 7.2 userpoints.module \userpoints_get_list_header()

Returns the header array definition for userpoints listings.

2 calls to userpoints_get_list_header()
userpoints_admin_points in ./userpoints.admin.inc
Provides an administrative interface for managing points.
userpoints_list_users in ./userpoints.pages.inc
Lists the users and their point totals by all or by category.

File

./userpoints.module, line 1959

Code

function userpoints_get_list_header() {
  $header = array(
    array(
      'data' => t('User'),
      'field' => 'u.name',
    ),
  );
  if (count(userpoints_get_categories()) > 1) {
    $header[] = array(
      'data' => t('Category'),
      'field' => 't.name',
    );
  }
  $header[] = array(
    'data' => t('!Points', userpoints_translation()),
    'field' => 'p.points',
    'sort' => 'desc',
  );
  return $header;
}