Hi,
Thanks for your suggestion. I just pushed a new version of the plugin that allows modifying the column value before displaying it.
You can now use this – add_filter( ‘muc_filter_custom_col_val’, ‘YOUR_CUSTOM_CALLBACK_FUNCTION’, 10, 3 ); in a theme or plugin to achieve your results.
I am not able to find the buddypress class you mentioned (I downloaded the latest BP plugin) and could not provide you the exact code required for your specific needs.
However, the process will be like this:
1. Add a new column – Enter it’s name and usermeta. The usermeta can be anything you like (as you would not need it to be loaded from database).
2. Add the add_filter code I mentioned above in your theme’s functions.php file or a custom plugin
3. Add the callback function that will return the modified value for a column.
An example would look like this:
add_filter( 'muc_filter_custom_col_val', 'muc_filter_col_val_callback', 10, 3 );
function muc_filter_col_val_callback($custom_col_val, $column_id, $uid){
if( $column_id == 'custom_cal' ){
// logic to calculate user data
return 'User ID - ' . $uid;
}
}
Replace the column id in if condition. This is the usermeta that you entered while adding the new column. Also, update the code logic as per your requirements.
I hope this helps but let me know if you have any questions.