You are here

function userpoints_get_info in User Points 7

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

Returns information about point-providing modules and operations.

See also

hook_userpoints_info()

2 calls to userpoints_get_info()
userpoints_create_description in ./userpoints.module
Creates a descriptive reason for a userpoints_transaction.
userpoints_operation_autocomplete in ./userpoints.admin.inc
Autocomplete callback for search an operation.

File

./userpoints.module, line 1736

Code

function userpoints_get_info($operation = NULL) {
  static $info = NULL;
  if (!isset($info)) {

    // Collect information.
    $info = module_invoke_all('userpoints_info');

    // Allow other modules to alter that information.
    drupal_alter('userpoints_info', $info);
  }
  if ($operation) {
    if (isset($info[$operation])) {
      return $info[$operation];
    }
    return NULL;
  }
  return $info;
}