-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserpoints.api.php
More file actions
57 lines (51 loc) · 1.5 KB
/
userpoints.api.php
File metadata and controls
57 lines (51 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* @file
* API documentation for userpoints.module
*/
/**
* Return information about registered operations.
*
* Modules can register operation strings
*
* @return
* An array whose keys are operation strings used in
* userpoints_userpoints_api() and the which has the following properties:
* - description: A string that is used as a reason when transactions are
* displayed. Either this or a callback (see below) is required.
* - description callback: If the reason is dynamic, because he for example
* includes the title of a node, a callback function can be given which
* receives the transaction object and (if existing) and entity object as
* arguments.
* - admin description: A description which is searched for and displayed in
* the operation autocomplete field in the add points form.
*
*/
function hook_userpoints_info() {
return array(
'expiry' => array(
'description' => t('!Points have expired.', userpoints_translation()),
'admin description' => t('Expire an existing transaction'),
)
);
}
/**
* Allows to customize the output of a the users by points page.
*
* @param $output
* Render array with the content.
*
* @see userpoints_list_users().
*/
function hook_userpoints_list_alter(&$output) {
}
/**
* Allows to customize the output of a the my userpoints page.
*
* @param $output
* Render array with the content.
*
* @see userpoints_list_transactions().
*/
function hook_userpoints_list_transactions_alter(&$output) {
}