This filter allows you to adjust or add your own custom user related template tag to use in log entries. Should be used in combination with the mycred_has_tags filter in order to work.
Param | Type | Required | Description |
---|---|---|---|
$content |
string | Yes | The rendered log entry string. |
$user |
array or obj | No | The WordPress user object or the object in array form. When a user is deleted from the database, and you have selected not to remove their log entries, myCRED will save their user object in an array form in the data column. So when rendering log entries, you need to keep this in mind accessing data. |
$data |
array | No | The value stored in the data column of the log entry. |
Package | Prio. | Description |
---|---|---|
mycred/core | 10 | Used by the myCRED_Settings class. |
Example 1: Add a custom user related template tag showing the users avatar.