WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Custom Roles and Capabilities for specific plugins (7 posts)

  1. phatpat10
    Member
    Posted 1 year ago #

    Hello all,

    Anybody know how to create custom capabilities for a custom role that I created. For instance i've created a new role named "Employer" in which I want him/her to have the same capabilities as a subscriber, but to also be able to access a certain plugin that I have installed. The plugin is a resume and job posting, which creates extra tabs in the dashboard and I want it to have it so my new role can only access this? Here is the link for the plugin:

    http://wordpress.org/plugins/resume-submissions-job-postings/

    Any help is much appreciated! :)

  2. Robin W
    Member
    Posted 12 months ago #

    since the plugin says that it "allows the admin to...", the I'd suggest you look through the plugin code for where it limits to admin, and add your employer role to that code.

  3. phatpat10
    Member
    Posted 12 months ago #

    I've checked and it allows any roles that are able to edit posts, in which they are also able to edit the plugins features. The lowest it goes is a Contributor, but i only want my role to only edit this plugin and not have access to edit posts etc.... Here is the code within the plugin

    define( 'MANAGEMENT_PERMISSION', 'edit_pages' ); //The minimum privilege required to manage plugin.
    define( 'SUBTABLE', $wpdb->prefix . 'rsjp_submissions' );
    define( 'JOBTABLE', $wpdb->prefix . 'rsjp_job_postings' );

    Pat

  4. Andrew
    Forum Moderator
    Posted 12 months ago #

    You may have better luck posting in that plugin's subforum.

  5. phatpat10
    Member
    Posted 12 months ago #

    Yes I did thanks, still no replys, thought I could post in both just in case as I'm hoping to have this resolved within a couple days. Appreciate your concern:)

  6. Robin W
    Member
    Posted 12 months ago #

    Not having seen the plugin, I was thinking more that the code where they actually used the features, you'd just put some code like

    if ( current_user_can( 'employer' ) )
        echo "Hi, dear employer! Glad seeing you again!";

    to limit who could do what

  7. I'm closing this post, Since you posted here: http://wordpress.org/support/topic/custom-capability-to-edit-this-plugin?replies=1

    Please don't make duplicate posts again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.