Created
February 26, 2017 15:39
-
-
Save gabrielmerovingi/b25f6942fff5be0f2dd7f3b7fc2d778e to your computer and use it in GitHub Desktop.
Insert a users avatar into the members column in leaderboards instead of adding a new column.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Insert Avatar in Leaderboard Column | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
function mycred_pro_bp_leaderboard_avatar_column( $content, $row, $group_id, $point_type ) { | |
return get_avatar( $row->user_id, 64 ) . $content; | |
} | |
add_filter( 'mycred_bp_leaderboard_member_column', 'mycred_pro_bp_leaderboard_avatar_column', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment