Skip to content

Instantly share code, notes, and snippets.

@gabrielmerovingi
Created January 26, 2016 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielmerovingi/89c72f1144bd3d8f304f to your computer and use it in GitHub Desktop.
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.
/**
* 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