Removing rtMedia from Admin bar based on User Roles in BuddyPress

I am designing a BP site, and I am having a hard time getting ‘Right Now in rtMEdia’ out of the Dashboard for the rank and file members. I have a few Admin Customizing Plugins and it has not caught it. I need to get this out of the average users panel - any ideas?

Thanks guys!

Hi @ridingwiththeseniortech,

You can remove that in your theme/plugin. Check this line of code -> https://github.com/rtCamp/rtMedia/blob/master/app/admin/RTMediaAdmin.php#L52 from where this widget being added.

Now, as you know you can’t directly remove action which is a method of a class. Check this question which solves such scenario -> http://wordpress.stackexchange.com/questions/57079/how-to-remove-a-filter-that-is-an-anonymous-object

THanks for the quick preply!!

I think you are unfortunately overestimating my coding skills - SORRY!!!

I found the line of code you referred to - Should I delete it? - if I do and my plugin updates will it re-introduce the feature I am trying to eliminate? if so- will using a child theme arrangement cover this update scenario (since this plugin is not a theme necessarily)?

Also I do not see how the Stackexchange thread addresses the question - it does not refer to roles or filter for them. It shows an abstract for removing something that shows, but not based on Roles. the goal is to prevent certain Roles from seeing admin options they have no business playing with.

No you can’t just delete it and if you delete it, it will be overridden in next update of plugin.

The Stackexchange thread is just a way for how to remove action which is a method of a class which you can use in your theme/plugin and in that check user role and according to that remove that hook.

You can hire a developer to do that.