You are here

function userpoints_invoke_all in User Points 7

Invokes hook_userpoints() with params passed by references.

Parameters

$op: The operation being performed.

&$params: Parameters to be passed to the hook.

Return value

An array of return values of the hook implementations. If modules return arrays from their implementations, those are merged into one array.

2 calls to userpoints_invoke_all()
userpoints_admin_settings in ./userpoints.admin.inc
Menu callback for settings form.
userpoints_userpointsapi in ./userpoints.module
Save userpoints changes and call hooks.

File

./userpoints.module, line 1716

Code

function userpoints_invoke_all($op, &$params = array()) {
  $return = array();
  foreach (module_implements('userpoints') as $module) {
    $function = $module . '_userpoints';
    $result = $function($op, $params);
    if (isset($result) && is_array($result)) {
      $return = array_merge_recursive($return, $result);
    }
    else {
      if (isset($result)) {
        $return[] = $result;
      }
    }
  }
  return $return;
}