Plugin authors can now tie directly into CubePoints Buddypress Integration and add options to the admin menu. Such as setting values for earning/deducting points. You can also log the actions.
Let’s get started. I’ll explain the best I can what these functions do.
cp_points($type, $uid, $points, $data)
- $type: Your unique action identifier (It identifies the purpose of the point)
- $uid: the user id to which points should be given
- $points: how many points you want to give
- $data: Don’t worry about this one. We can leave it blank. I can be used to show more detailed info in the database if you’d like to run queries on it.
- Not sure how to fully use this since there is no documentation. But if you place something in there it won’t show on the front end in the logs. Only the database.
Here is the function you need to add to your action to give/remove points.