Created
January 26, 2016 02:08
-
-
Save gabrielmerovingi/89c72f1144bd3d8f304f to your computer and use it in GitHub Desktop.
By default, myCRED will give users a badge automatically based on your setup. This snippet will allow you to create badges that will never be automatically awarded to users. These manual badges would need to be added manually by editing the user in the admin area.
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
/** | |
* Manual Badge Reference | |
* @version 1.0 | |
*/ | |
add_filter( 'mycred_all_references', 'mycred_pro_manual_badge' ); | |
function mycred_pro_manual_badge( $references ) { | |
$references['disabled_feature'] = 'Badge is manually awarded'; | |
return $references; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment