WordPress uses a concept of Roles, designed to give the site owner the ability to control what users can and cannot do within the site. Each role is allowed to perform a set of tasks called Capabilities.

learn more… | top users | synonyms (1)

2
votes
1answer
53 views

Users with custom roles can't read each other's comments

My site has a custom role ("coach") with its own set of capabilities (via map_meta_cap along with a few built-in roles). Each user is assigned a page on the site that they "own" and can edit (via a ...
2
votes
1answer
87 views

Allow contributors to moderate comments comments on posts they write

I run a multi-author wordpress site where we have a large number of contributors that can write articles, which are published after they are reviewed by an editor. (This is all standard wordpress ...
2
votes
1answer
66 views

Listing all capabilities in dropdown is returning boolean

Trying to put a list of all possible caps in a dropdown. I can only get it to return 1s (boolean true). If I use var_dump($user->allcaps); it does produce the actual cap names, but when I plug this ...
2
votes
1answer
336 views

How can I have different groups of editors only allowed to edit certain parent+subpages?

I've tried a bunch of different plugins, including Role Scoper, Advanced Access Manager, User Account Manager and more, to accomplish this but can't seem to get it working right. Basically, the ...
2
votes
1answer
146 views

edit_comment capability for subscriber

I have given my site's subscriber role the following permissions (unserialized DB-query): [subscriber] => Array ( [name] => Reader [capabilities] => Array ( ...
1
vote
1answer
21 views

Restrict Capability of Administrator to Create, Edit and Delete Pages in Multisite

In my multisite installation, I need to restrict administrators from being able to create, edit, and delete pages. That is, I need all pages to be created/edited/deleted by superadmins while ...
0
votes
1answer
21 views

Author capabilities: Deleting comments on their own published posts

I know users that have role author can delete their own published posts. But if someone comments on one of their posts, does the post author have the capability to delete that comment?
0
votes
1answer
27 views

Need to create admin user without capability to create user

I need to remove user related capabilities(such as 'create_users', 'add_user', 'list_users', etc...) of an admin user. I tested the code below in an 'init' method. global $current_user; ...
0
votes
1answer
36 views

re-register custom post type with custom capabilities

I have created custom post type as below. register_post_type( 'connector', array( 'labels' => array( 'name' => __( 'Connectors' ), 'singular_name' => __( ...
0
votes
1answer
29 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' ); ...
0
votes
1answer
29 views

New Roles and Capabilities in WordPress

I am creating a new role in WordPress, and I would like it to be simlar to an 'author' role, except that this new role only allows 'working with' a specific category (in other words, it allows ...
0
votes
1answer
40 views

How to change a user role after registering in multisite?

New users who create their own blog in WP Multisite get administrator privilages after registration. However, I don't want them to have so many privilages. I know there is a way to change their role ...
0
votes
1answer
237 views

Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?

even though I think I understand the hierarchy of roles in WordPress, I never really bothered creating my own user roles or custom capabilities. What I need to achieve is to assign a few capabilities ...
0
votes
1answer
63 views

Is there a way of retrieving the core WP capabilities?

I've created a plugin that adds new capabilities & assigns them to both WP & core WP roles. I would like to remove these capabilities when the plugin is deactivated, but I need to check that ...
0
votes
1answer
26 views

Pricing Tables admin page capability

I'm creating a plugin that will allow to create Pricing Tables in a fast and easy way. But, I'm not sure what rule to use for capability. What would you use? Right now I'm using edit_pages: ...
0
votes
1answer
126 views

Prevent Admin user to edit/see super admin from users list

How do I hide my super admin from the users list? My client has to be the ability to create users, but not edit/see my super admin user. Is that possible?
0
votes
1answer
106 views

Custom Capabilities for CPT and Problem with current_user_can()

I have setup a CPT with custom capabilities. add_action('init', 'fac_product_posttype_init'); function fac_product_posttype_init(){ $product_labels = array( ... ); $caps = array( ...
0
votes
1answer
58 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( ...
0
votes
1answer
155 views

Custom role, capabilities, and post type: preview button wrecks things

I'm using the Members plugin to manage capabilities of a custom role that will only be able to edit/publish a custom post type that I created in my functions.php file. After much work, I got this ...
1
vote
0answers
40 views

Create a custom capability to allow an 'Editor' to edit only 'Subscriber' users

I want to create a new "Moderator" role (in between Administrator and Editor), that can edit only "Subscriber" type user accounts. I can create the role and add existing wp capabilities, but I don't ...
1
vote
0answers
134 views

Restrict edit, but allow preview for custom post status

I am developing a Wordpress site with Edit Flow plugin, so I can create custom post statuses to manage author and contributor posts more easily. So I have created custom post status and I've got ...
1
vote
0answers
70 views

Wordpress capabilities on pending post status

I have user with contributor user role. In default if you publish article as contributor you can only view it and you can't delete or edit it. But when you submit new post for review, you can do all ...
1
vote
0answers
53 views

Purpose of Adding Capability to Role But Not Grant?

I am attempting to create a custom role upon activation of my plugin. Along with that role, I wanted to add new capability to that role to access later. Now, after reading the Codex, I am totally ...
1
vote
0answers
67 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 ...
1
vote
0answers
53 views

Is it wise not to use only meta capabilities for certain basic post types?

I've been a WP developer for a couple of years now but only recently has the concept of meta vs. primitive capabilities really "clicked" with me. I'm building some tools right now to allow easy ...
0
votes
0answers
15 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
0answers
13 views

Add capability to role for all sites in network

We are running a multisite install. I want to add the capability to edit menus for contributors. I am doing that with this code: $role_object = get_role( 'contributor' ); $role_object->add_cap( ...
0
votes
0answers
41 views

How can I add Menu Page to specific user?

I've installed a plugin for my client called uTubeVideo, but he has a user role of editor so the option page of the plugin won't display for him. Initially, i thought I could fix this using the if( ...
0
votes
0answers
14 views

Granting Author the capability to access a submenu item under Tools

I need the Author role to have the capability to access a submenu item (a third party plugin item) under the Tools menu in the admin. By default WordPress grants capability to the Tools menu for only ...
0
votes
0answers
14 views

What would prevent a custom role from viewing posts (both standard and custom)?

I am using a custom role (from the premium plugin wp-client) but for some reason it can't view posts or pages of any kind. WordPress shows the correct post count but only shows the message "No posts ...
0
votes
0answers
27 views

WordPress Custom Post Type Delete Permissions

We've been developing a site recently that is going to have a lot of users and varying levels of permissions for those users. For this we went with Role Scoper but it seems to have a few issues in ...
0
votes
0answers
30 views

Restrict editing of a custom post type based on status and user capabilities

I have a custom post type guest_blog registered with 'capability_type' => 'guest_blog' and 'map_meta_cap' => true. I want to restrict users that do not have publish_guest_blogs capability from ...
0
votes
0answers
29 views

Set permissions to view custom admin pages by Role, not Capability

When using add_submenu_page(), Is there a way of specifying a Role instead of a Capability? I have added a menu to the WP admin area which has 4x sub-menu pages. The level of access to three of these ...
0
votes
0answers
14 views

Compare revisions on pending posts doesn't work for authors and lower

I'm using map meta cap to allow extra permissions (edit/publish/edit_others/read_private/edit_private) if the user and post share a category. Comparing revisions doesn't work beyond the first ...
0
votes
0answers
38 views

role manage_options always return true

i have a serious problem with wordpress roles, i have some custom roles ( [data] => stdClass Object ( [ID] => 7 [user_login] => test [user_pass] => ...
0
votes
0answers
35 views

Capabilities for custom post type visible in backend but not working

In my plugin I have created a custom post type and defined capabilities for both the subscriber and the administrator role. When I go into the backend and look at the capabilities that are in the ...
0
votes
0answers
46 views

Permissions with Custom Post Types

Afternoon everyone. I made a theme for a friend's site using a custom post type called "fixtures" but I can't get it to allow users listed as "Writers" to be attributed as the authors of these posts, ...
0
votes
0answers
94 views

When creating new terms I get PHP Notice: has_cap was called with an argument that is deprecated

I have created a taxonomy that acts like category. Then I used this code to add image to very term. All works great but I faced 2 problems. How can I remove image from term after I have selected ...
0
votes
0answers
49 views

How to remove capabilities based custom user meta

I am using woocommerce vendor plugin. So, Need to remove some capabilities when a user has a a certain field value for example -- if the user has a custom field Membership Type="standard" on his ...
0
votes
0answers
99 views

Media Insert (Media Upload) doesn't work on author role in Front-End

I have a problem. In my front-end I have a Write a Post area, where users can write a post, and add their own images. I have inserted the media upload with wp_enqueue_media(); With my current ...
0
votes
0answers
41 views

Adding a new Custom Capability

(There are about 3-5 answers regarding this question that I can find and none give a solid answer - I want to do this without external plugins because this is for my own plugin) I am looking to add ...
0
votes
0answers
56 views

Edit Posts With Pending Status For Logged User

My site uses the postname Permalink. I have a page which displays a WP_Query loop of posts of a custom post type for a given logged in User. I display both 'Pending' and 'Publish' status posts with a ...
0
votes
0answers
27 views

Is there a good way to prevent users (except Admin/Network Admin) to change page template?

I'm searching for a way to prevent users to change the page templates. Unfortunately there is no such capability i can remove and the only way so far is to remove the <select id="page_template" ...
0
votes
0answers
79 views

Don't strip iFrame without “unfiltered html” capability

I want some custom user roles to be able to insert youtube iFrames in the wp_editor. But since I don't want these users to have the whole scope of the capability "unfiltered html", I don't know how to ...
0
votes
0answers
60 views

Assign custom posttype capabilities on init: no menu-item on activation

I develop plugin with custom post type (cpt) who has some custom capabilities. I add those capabilities to the roles (according to the current caps, see code below) on plugin activation. That won't ...
0
votes
0answers
34 views

No multisite but a super admin without sufficient privileges

I have no multisite but I'm super admin. Why I do not know. After I changed username and password on the super admin has super admin no longer all privileges. In some settings, and plugin, I get: ...
0
votes
0answers
42 views

Custom taxonomy not working after capability change

I have a custom taxonomy, that worked fine. Until I did the following: Added new role Assigned a new capability for the taxonomy Created new post type, and assigned the taxonomy to it (The cpt name ...
0
votes
0answers
43 views

Create new capability but restrict to specific page

I am using a custom upload box to allow a subscriber to upload their own avatar. currently the upload is failing as subscribers do not have media upload permissions. I do not really want to enable ...
0
votes
0answers
78 views

Capability to read user's own draft post of CPT

I've got a custom role called 'Gym' and custom post type (CPT) called 'Story'. Every Gym user can create a draft of a story and view their own story drafts. My 'Story' CPT have got the following ...
0
votes
0answers
44 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 ...