How do I deactivate a plugin for some roles
I’ve tried this for the plugin BP Activity Share but it doesn’t seem to work… this is what I have, where am I going wrong? /**disable the BP Activity share for all except admin**/ add_action(‘admin_init’, ‘my_filter_the_plugins’); function my_filter_the_plugins() { global $current_user; if (in_array(‘Participant’, ‘Subscriber’, $current_user->roles)) { deactivate_plugins( // deactivate for participant and subscriber array( ‘/bp-activity-share/bp-activity-share.php’ … Read more