Clanbite Points Since 1.4.0
clanbite_points_revoke( string $ref, int $user_id = 0 ): intTake back the points a reference earned, for example when the post that earned them is deleted.
Pass the same points_ref you gave clanbite_points_award() in its context. Awards recorded under that reference or beneath it (sk_post:34 also covers sk_post:34:comment:9) are reversed with a negative ledger row and removed from the balance, which never drops below zero. Safe to call twice.
Namespace: Kernowdev\ClanbitePoints
Parameters
$ref(string) RequiredReference (
points_ref).$user_id(int) OptionalOnly take back this member's points (0 = whoever earned them).
Default:
0
Returns
int Points taken back in total.
Defined in inc/functions.php
Changelog
| Version | Description |
|---|---|
| 1.4.0 | Introduced. |