0
votes
0answers
31 views

WPMU - SuperAdmin / plugin install permissions

let's suppose I have Wordpress Multisite install and I have there SuperAdmin. I need to restrict "install_plugin" capability in Network Admin for SuperAdmin mentioned above. How can I do that? I ...
0
votes
1answer
34 views

Remove specific administrator's capability

I've created two administrator users X and Y. And now I need to remove capability of 'edit_plugins' from user Y. I've searched and found, http://goo.gl/LttuvX $user = new WP_User( 'Y' ); ...
3
votes
1answer
148 views

WordPress Capabilities: edit_user vs edit_users

The official documentation only mentions edit_users, but in the source I found many places are using edit_user, what is the difference? Are there any conventions for singular and plural capabilities? ...
0
votes
0answers
45 views

How to make a plugin appear only to a certain role of user?

I'm using a plugin called "Team Result", to create team results and things like that. It appeared on the dashboard for admin(me). As you can see in this print ...
0
votes
1answer
59 views

Completely remove ability to create users?

I have added the code below to a plugin: add_action( 'admin_init', 'remove_add_users_cap' ); function remove_add_users_cap() { $role = get_role( 'administrator' ); $role->remove_cap( ...
1
vote
0answers
70 views

Unable to delete custom post types, confusion around capabilities

So I'm working on a plugin for creating a questions/answers system that's as simple and well-integrated as possible (not unlike this site) but am stuck at the creation of the custom post types. You ...
0
votes
2answers
402 views

Require Capability to View Woocommerce Product

I am using Woocommerce and I have products in a category called B2B whose single_product.php is only to be shown to people with the capability read_b2b. <?php if ( have_posts() ) : ?> <?php ...
1
vote
2answers
100 views

Making a plugin only available on the front-end for the logged in super admin

I made a little plugin that enqueues 1 .js file and 1 .css file into a theme's front-end. All it does it load a grid on top of the theme so I can visualise the design. If this plugin was activated ...
0
votes
2answers
556 views

How to hide plugin options for editors via functions.php

I've read the entry Best Collection of Code for your functions.php file, it really help me a lot. I only got a question, is there a way to hide some plugins options (in their respective ...