Home › Forums › Calendar Products › Events Calendar PRO › Remove Admin pages depending on Role / Capabilities
- This topic has 7 replies, 2 voices, and was last updated 11 years, 4 months ago by
Brian.
-
AuthorPosts
-
January 19, 2015 at 3:29 pm #934903
Ryan
ParticipantHi 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!
January 19, 2015 at 6:39 pm #934990Brian
MemberHi,
Sounds like an interesting project.
We have a filter that can turn off the Add Ons Message, check out this link:
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
January 20, 2015 at 7:36 am #935190Ryan
ParticipantHi 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!
January 20, 2015 at 7:38 am #935193Ryan
ParticipantHere’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
January 20, 2015 at 8:15 am #935214Brian
MemberIf 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.
January 20, 2015 at 11:41 am #935311Ryan
ParticipantHi 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.
January 20, 2015 at 12:07 pm #935321Ryan
ParticipantHi 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!
January 20, 2015 at 12:28 pm #935328Brian
MemberOk 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 🙂
-
AuthorPosts
- The topic ‘Remove Admin pages depending on Role / Capabilities’ is closed to new replies.
