• Resolved colinsp

    (@colinsp)


    I have a custom role which has limited editor permissions. I would like them to have access to the Broken Link Checker but because they aren’t Admins or Editors I cannot assign use of the plugin to them. Is there a way I can add this additional role to the plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @colinsp ,
    Yeah that is possible to you’ll have to add the edit_others_posts to your custom user role.
    You can do that via the User Role Editor plugin or you can add the following code on your child theme or a custom plugin. Just make sure you change the role slug and replace it with your actual role slug.

    function wpmudev_simple_role_caps() {
        $role = get_role( 'sample_role' );
        $role->add_cap( 'edit_others_posts', true );
    }
    add_action( 'init', 'wpmudev_simple_role_caps', 11 );

    Hope this helps.
    Best regards,
    Biplav.

    Thread Starter colinsp

    (@colinsp)

    Great, thanks that works fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom role use’ is closed to new replies.