Plugin Author
myCred
(@designbymerovingi)
Hey
Not sure I understand your question. You want to give points or deduct points? What user groups are we talking about?
Hello!
I mean both give and take down points. At the moment this plugin works all the wordpress registered user. Is it possible to set the plugin only user who are in editor usergroup.
Plugin Author
myCred
(@designbymerovingi)
You mean you want to restrict usage to those with the Editor “role”?
You can always use the mycred_add filter to hook in and restrict users gaining or loosing points based on any user detail.
Example: Restrict users who are not Editors from using myCRED
add_filter( 'mycred_add', 'restrict_points_for_non_editors', 10, 3 );
function restrict_points_for_non_editors( $reply, $request, $mycred )
{
// Role check though capabilities
if ( ! user_can( $request['user_id'], 'delete_others_pages' ) ) return false;
return $reply;
}
You can find more information on Roles and Capabilities in the WP Codex.
Sorry, very dumb question. Where I put this code?
Plugin Author
myCred
(@designbymerovingi)
In your themes functions.php file