I’m in wp-admin/index.php . Right in the beginning are the basic funtions for all users, but I cant find anything like ” current_user_can (‘view_plugins’).
If anyone could help me with this, I’d be very grateful!
UPDATE: I finally found menu.php to be the applicable file if anyone is looking into this.
UPDATE: Think I have to screw with the plugin themselves, as the menu.php won’t let me break them out
Please do not ever consider editing core files. There are tons of action and filter hooks you can use to change core behavior without editing the files themselves. Your code using these hooks can either go in functions.php of a child theme or in your own site specific plugin. See Plugin API. This applies to child themes as well despite the title for plugins.
That said, something is being done by one of your plugins or your theme to change menu visibility, because by default, contributors should not be able to see plugin, settings, appearance and other admin related menu items, much less do anything with these items. Isolate the offender by switching to a default twenty* theme and deactivating all plugins. You’ll see contributors cannot see much of the menu. Reactivate your theme, then each plugin, one by one. Check the menu visibility after each step. When the admin items appear for contributors, the last thing you activated is the offender. Take up the issue with the related author of that theme or plugin.