Remove Admin pages depending on Role / Capabilities

Home Forums Calendar Products Events Calendar PRO Remove Admin pages depending on Role / Capabilities

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #934903
    Ryan
    Participant

    Hi guys!

    Just started using your plugin for a big project and I’m super impressed with all the capabilities of the plugin so far.

    I’m going to be using the plugin on a massive install with potentially thousands of users on hundreds of sites. I’m looking to customize some of the admin areas to make the plugin simpler for the majority of users.

    Here’s my question: is there a way to disable the “Event Add-Ons” link in the admin area for certain roles / capabilities?

    I’m browsed through the plugin files and the CSS to determine how to do this but can’t find the code.

    If there is a way to add this capability, that would be super helpful. Thanks!

    #934990
    Brian
    Member

    Hi,

    Sounds like an interesting project.

    We have a filter that can turn off the Add Ons Message, check out this link:

    Removing the Add-On Upsell

    If that is what you are looking for you can wrap that with a conditional based on a role to use or not.

    Let me know if that helps.

    Thanks

    #935190
    Ryan
    Participant

    Hi Brian,

    Thanks for the help. While the code snippet above looks cool, it doesn’t actually fix the problem I’m having.

    I’d like to remove the link along the left-hand side that says “Event Add-on” that goes to a page with a bunch of information regarding the add-on plugins for The Event Calendar. I would add a screen shot but I’m not seeing any way to add images to this forum.

    Thanks!

    #935193
    Ryan
    Participant

    Here’s a screen shot of what I’m seeing. I’d like to get rid of the last link in the menu.

    https://www.dropbox.com/s/ugnagstmbd9q9j6/Screen%20Shot%202015-01-20%20at%208.37.10%20AM.png?dl=0

    #935214
    Brian
    Member

    If you add this to the wp-config.php it will hide that link, I just tested to make sure.

    define(‘TRIBE_HIDE_UPSELL’, true);

    However, that would be for everyone.

    If you wanted it to show for certain roles I think you could do it with conditionals and just hiding it will css.

    #935311
    Ryan
    Participant

    Hi Brian,

    Thanks for the quick responses. Unfortunately, that still didn’t work. The messages references in the Knowledge Base article were removed from view, but the link to the add-on page is still showing up.

    #935321
    Ryan
    Participant

    Hi Brian,

    I actually fixed it! The problem is that I needed to add the line close to the top of wp-config.php.

    I had the line located at the very end of the document which didn’t work. It only worked when I put it above all the database details, which is also where I noticed it on this Knowledge Base article: https://theeventscalendar.com/knowledgebase/configuring-the-events-calendar-with-constants/

    Thanks again!

    #935328
    Brian
    Member

    Ok cool,that is where I was putting it, so I was puzzled why it did not work for you. Good to know the location makes a difference.

    Glad it is working now.

    Since this is resolved I am going to close this ticket, but if you have any questions related to this or something new, please create a new ticket for us to help you out 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Remove Admin pages depending on Role / Capabilities’ is closed to new replies.