Skip to content

Instantly share code, notes, and snippets.

@mycred
Created July 19, 2018 14:12
Show Gist options
  • Save mycred/b10a785b7023ca044ccd29a26e70c195 to your computer and use it in GitHub Desktop.
Save mycred/b10a785b7023ca044ccd29a26e70c195 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