Created
April 10, 2017 11:01
-
-
Save gabrielmerovingi/4162b7d19ec672da6c1ef0004da41ed1 to your computer and use it in GitHub Desktop.
When viewing a group leaderboard, show only our own name and hide everyone elses.
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
/** | |
* Hide Leaderboard Names | |
* Hide everyone elses leaderboard names only showing our own | |
* @version 1.0 | |
*/ | |
function mycred_pro_hide_leaderboard_names( $content, $row ) { | |
if ( $row->user_id != get_current_user_id() ) return 'Member'; | |
return $content; | |
} | |
add_filter( 'mycred_bp_leaderboard_member_column', 'mycred_pro_hide_leaderboard_names', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment