Clanbite Points Since 1.4.0

clanbite_points_revoke( string $ref, int $user_id = 0 ): int

Take 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) Required

Reference (points_ref).

$user_id (int) Optional

Only 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

VersionDescription
1.4.0Introduced.