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)

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
2answers
79 views

Custom user roles for access to specific parts of the site

I need to create specific sections of my site which should only allow certain users to access them. So basically, I'll be having a staff section - if the user is a staff member, they'll see a link to ...
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
3answers
1k views

Capabilities and Custom Post Types

I have a custom post type that I'd like to restrict access to certain roles however, I've already added content using the custom post type and now I have to make them restricted. The capability_type ...
1
vote
1answer
416 views

How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?

The default taxonomy, category. By default, only those with the edit_posts capability can assign categories during post creation/editing. I have a role with very limited capabilities. I want to let ...
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" ...
8
votes
4answers
571 views

How do I make a draft post accessible to everyone?

I have several unpublished posts in my Wordpress website and I am trying to make it accessible for normal users (who are not logged in) using the normal post slugs (site.com/post-here). I understand ...
0
votes
1answer
53 views

Capability to read/edit page in wp-admin only for administrators

I want to create a page which is only for editable and readable (within wp-admin) for administrators. To restrict other users to edit any page (and not only the own ones) is not the solution as I want ...
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: ...
3
votes
1answer
118 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? ...
4
votes
1answer
98 views

Allow authors to edit only certain users

I am trying to give my "authors" (who I have renamed "captains") the ability to access the user profile of their team members and only their team members. The teams are defined by a user-meta box ...
0
votes
1answer
631 views

Custom Post Types - Capability Type

I've been developing a custom post type plugin for my own purposes and I want to understand capabilities in regards to custom post types a little better before I move forward. Unfortunately the ...
1
vote
1answer
92 views

map_meta_cap woes

I have created a custom post type and want it to behave like a page. Certain roles need to have access to it and not to posts or pages. So I created my custom post type with a capability-type and ...
1
vote
1answer
542 views

Reset default roles and capabilities

I've been having a difficult time adding custom post type capabilities to roles (Adding capabilities to default roles) and I suspect that my muddling around may have caused some problems. I also have ...
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
74 views

how do I add role and capability after I create a new user

I have a simple requirement: 1. create a user 2. create a role for the user 3. add capability for the role First, create a new user $uid = wp_insert_user($userdata); Second & Third, create a ...
0
votes
4answers
2k views

what's the meaning of the field wp_capabilities in table wp_usermeta

I am new to wordpress, in table wp_usermeta I notice that we have a row meta_key meta_value wp_capabilities a:1:{s:13:"administrator";b:1;} First, what's the meaning of ...
1
vote
1answer
219 views

Remove wordpress author's capability to moderate comments on their own posts

WordPress authors have permission to edit others comments on their own post. How to disable this and still allow the authors to edit their published posts?
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
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
98 views

get_posts() doesn't consider user permissions

I want to show a list of links to posts for the logged in user on my wp. So I started to do so: $posts_array = get_posts( array( 'post_type' => 'download', 'post_status' => 'publish' ) ); ...
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 ...
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 ...
0
votes
1answer
412 views

Roles and Capabilities in Custom Post Types

Is there a way to create one role with one capability and apply it to some of the custom post types? What I am doing right now is ending up with applying capabilities to all of the posts.. creating ...
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
1answer
138 views

Conflict between Capabilities and Menu Visibility with Custom Post Types

I hope this isn't just the result of typo on my end, but if it is, I'm not seeing it. I'm adding a custom post type to my site. Actually I'm adding three. Two of them I'm trying to set custom ...
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 ...
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
1answer
45 views

User capability per post

According to Codex we can perform current_user_can checks for certain post_ID, but I fail to find any bit of info how to set a capability explicitly for that post_ID. A follow up question - how to ...
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 ...
6
votes
1answer
661 views

Allow Editors to edit pending posts but not draft ones

I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role: As you can see, they are allowed to edit_posts and ...
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 ...
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 ...
2
votes
2answers
445 views

Read only capability for custom post in admin area

I'm actually building custom type to WP and need to be able to restrict post access to some user role, ie. in admin area, collaborators can see posts but can't edit them, just only open them as ...
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
110 views

How to let a role handle media without post permissions

I have a CPT to replace my "post"-post-type, but I still need to be able to use attachments. The problem is, that attachments have the post-capabilities. I don’t want to give post capabilities to my ...
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 ...
2
votes
2answers
170 views

What is the difference between “create_users” and “add_users” capabilities?

The codex lists both create_users and add_users under roles and capabilities. Does anyone know what is the difference between these two?
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
1answer
64 views

“sufficient permissions” error for admin after duplicating WP database to new install

I recently copied the tables from a live WP install to a dev site for that same site. I've changed all the prefixes, the site/WP URLs, and the salt values. I can successfully log into the new dev ...
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
1answer
50 views

Adding Custom Capabilites

So, I'm not sure if this is possible, but is it possible to add custom Capabilities? So, I've written a group message application, that ties in with Wordpress. I only want certain members (set via ...
0
votes
1answer
206 views

Creating a folder structure

My WP site has a members area which they pay to get access to. I want that area to be a subfolder, so something like site.com/premium/nameofpage. I am aware of url rewriting, htaccess etc. Is that ...
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 ( ...
3
votes
1answer
391 views

Temporarily give 'manage_options' capability

In order to allow editors to edit other's author meta (update_user_attribute), I must give them the 'manage_options' capability or else I get a 'Cheatin' huh' die message. I only want to give them ...