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
9 views

creating different edit screens for different roles

I have created a custom post type and custom role, created the proper capabilities and assigned them so the new role and see and edit their own ctp's entries... but I'd like to create a customized ...
0
votes
0answers
23 views

Allow Multisite admin to edit users

i am using wordpress multisite. and i was looking for solution to allow sites admin to edit users that belongs to their website. as i understand, i need to give this permission to site admin to edit ...
0
votes
1answer
28 views

add_role menu pages are not visible

I added a custom role this way: add_role( 'tabellenadmin', __( 'Tabellenadministrator' ), array( 'activate_plugins' => true, 'delete_others_pages' => true, 'delete_others_posts' ...
0
votes
1answer
17 views

What capabilities are assigned to unauthenticated users?

After reading the Roles and Capabilities article I can see that the Subscriber role has read capabilities only. What capabilities (if any) would be assigned to an unauthenticated user? i.e. a website ...
0
votes
3answers
27 views

current user can edit user?

I want to know if it is good practice to use: if ( current_user_can( 'edit_user', $user_id ) ) { // do something } because in Wordpress documentation a did not see this capability
1
vote
0answers
16 views

Usage of current_user_can()

I have a custom post type company, which has its own custom set of capabilities, including read_company, edit_companies, publish_companies, and delete_companies. In order to implement a role-based ...
0
votes
0answers
27 views

usage of get_post_type_capabilities()

I'm trying to list all capabilities assigned to a post type by making use of a Wordpress function get_post_type_capabilites(). Here's what Wordpress Codex explains: Function Reference/get post ...
0
votes
0answers
20 views

Capabilities of a Custom Post Type and et_post_type_capabilities()

I created a custom post type item, and gave it custom-named capabilities as below. function register_custom_post_types() { $args = array( 'labels' => array( 'name' => ...
0
votes
0answers
30 views

add_role user capability not working

I added a role this way: add_role( 'paar', __( 'Tanzpaar' ), array( 'add_users' => false, 'create_users' => false, 'delete_users' ...
2
votes
0answers
40 views

Author Role - Allow editing of Gallery images

Is it possible to give the 'Author' role the capability of editing image titles and captions on post's they have created ? I have a number of users set to 'Author' , but when i've tested it's not ...
0
votes
0answers
22 views

Users can only save their draft once before saving for revision

I use the Members Plugin and Custom Post Types. I created a role and want them to contribute posts (within this Custom Post Type musician) but don't publish them. Additionally I want to give the ...
0
votes
1answer
59 views

Get User Role by ID not working

I'm using the PHP code seen at the bottom of this post to get the user's role from user ID. It works, but fails if the user role has been changed after registering. I've been looking for ages trying ...
5
votes
1answer
299 views

Allow user to “edit_others_posts” to save only, not publish

I want to add a couple of editors that can edit_others_posts, but I do not want them to be able to publish others posts, only save the post by clicking on the Submit for Review button. How can I do ...
0
votes
1answer
40 views

Capability to edit own post, but not create new one

i can't find anywhere how can i forbid to create new item, but allow editing of posts which was assigned to user. Lets say in my system there is admin who creates some posts, then assigns some ...
0
votes
0answers
30 views

Authors cant upload images unless publish_page permissions are set

I have a custom post submit form from frontend so authors can submit articles and use the tinymce editor along with the media manager. The problem, only administrators and editors can upload from ...
0
votes
0answers
64 views

Hide unapproved comments on front end of wordpress

I used this post I modified it to hide rather than show to contributors unapproved comments. This goes for unapproved comments on the contributor's own posts. I also used Adminimize to hide comments ...
0
votes
0answers
16 views

Error opening in a admin panel [duplicate]

I have uninstall plugins and theme shall we are getting error in followinf code in capabilties.php in line 1158 if ( ! $post_type->map_meta_cap ) { $caps[] = ...
0
votes
0answers
12 views

Error in capabilities.php [duplicate]

I have uninstall plugin & themes shall we are getting the error in capabilties.php following error code if ( ! $post_type->map_meta_cap ) { $caps[] = $post_type->cap->$cap; // Prior to 3.1 we ...
0
votes
0answers
23 views

Trying to get property of non-object in capabilities.php in 3.9.2 [duplicate]

In my website corrupted the plugins or themes, so FTP this remove plugin or theme. In that case error are given about capabilities.php. So install new wordpress version 3.9.2 but in that also ...
0
votes
0answers
34 views

Using list_users give access to Users menu but not Role dropdown

I have user role that is the "Manager" of the e-commerce part of a site. I have given this user the capability, list_userso that they can access the "Users" page in Admin and add/change various ...
1
vote
0answers
27 views

“edit_published_posts” and “edit_other_post” issue

I need to modify a roles capabilities for post editing: User can modify his own post (publish status doesn't matter) User can modify others posts (only as long as they are not published) I played ...
1
vote
1answer
139 views

How can I modify the Capability needed to access a plugin's options?

I have the following 3 different Roles: Admin, Editor, and SEO. I have installed WordPress SEO by Yoast, and I want to get this: I don't want the editors to see the SEO options, because they only ...
0
votes
1answer
44 views

Custom Role can't trash Custom Post Type

I have a post type that I set up some capabilities for and I attached them to a new Role, however, the role can not trash them. I'm not sure why though. Here is the portion of my array for the ...
2
votes
0answers
44 views

What's the difference between Role and Meta capabilities; When to use map_meta_cap() filter

I'm getting very confused about the following things: difference between Role and Meta capabilities, difference between Meta and Primitive capabilities, when to use map_meta_cap() filter. There ...
1
vote
1answer
44 views

Custom taxonomies capabilities

I have registered several custom taxonomies for a custom post type. Code for one of them is the following: $labels = array( 'name' => __( 'Genre', 'textdomain' ), ...
1
vote
1answer
65 views

Custom Post Type Capabilities

I have a custom post type which I want authors to be able to edit others posts but no able to delete others posts. My code as follows: $labels = array( 'name' => __( 'Book', ...
2
votes
1answer
69 views

Including only current user's posts in search

I am a new WP plugin developer. I want the search page to include only the current user's posts. I first added a new capability read_others_posts to only administrators and editors. Then I tried the ...
0
votes
1answer
17 views

Capabilities don't add

I've wrote this code. function wpo_install() { update_option( 'wpo_version', WPO_VERSION ); wpo_add_caps(); wpo_add_roles(); set_transient( '_wpo_activation_redirect', true ); } ...
0
votes
1answer
88 views

Add role and edit page capabilities

i've create a new user role and i want this user can edit page and use custom post type. For custom post type i've resolve but for the page not function. On backend the user can only see the page ...
0
votes
0answers
33 views

Adding post tags without capability edit_posts

I have a custom role called Event Contributor whose capabilities are limited to the post type "events". The role does not have the capability "edit_posts". The post type "events" has custom ...
0
votes
1answer
41 views

Plugin capabilities

I created an interface that allows users to do a certain number of actions, each of them having a capability associated (including accessing the interface). I would like to have a base capability ...
0
votes
0answers
44 views

Custom User Roles Added When Plugin Network Activated and not on Individual Site

I wrote a quick plugin which creates a list of custom user roles and capabilities for each user role. The user roles are checked and added if not found upon plugin activation. When I network ...
0
votes
0answers
71 views

Assign Role and capablitis on frontend registration

I have created 2 custom roles "customer" & "employee" form admin "members" plugin. I am trying to assign these to user registering for site according to options (customer & employee) they ...
0
votes
2answers
30 views

Capabilities Not Changing

I want editors to be able to list, add and edit users. I thought the following code would do it, but it doesn't work - no new User menu appears for any editors. Have I missed something? function ...
0
votes
1answer
76 views

Capability to prevent upload of files

I need the ability to allow users to insert media (images) into a page / post, but not allow them to upload the files. The only capability I can see is 'upload_files', which allows a user to upload / ...
0
votes
0answers
41 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 ...
2
votes
0answers
22 views

Capabilites not working [closed]

I created a custom post type: add_action( 'init', 'artwork_feature'); function artwork_feature() { register_post_type( 'artwork', array( 'labels' => array( 'name' => __( ...
1
vote
1answer
62 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
0answers
23 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
1answer
98 views

Hide user fields based off capability

I'm struggling with this one. I am trying to hide 2 user profile fields for the current user. Only the admin or user with "edit_users" capability should be able to view/edit these fields. Code: ...
0
votes
0answers
93 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
1answer
79 views

Odd behaviour with submenu link creation

I'm trying to develop a plugin that needs to add two pages to the dashboard side-bar menu. One of these being a main category. Everything is fine, except for the second submenu item for the settings ...
0
votes
1answer
93 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?
2
votes
2answers
127 views

How can I prevent a writer from being able to edit an article that has been scheduled?

In the old WordPress that I had, the writer (a type of user that could not publish) was, after an article was schedule, unable to go back to the article and edit it. But now in WordPress 8.1 they (the ...
0
votes
1answer
59 views

Add capability for editors to modify custom fields

Editors don't have a way to edit custom fields and I'm not seeing the capability in the WordPress codex. Is there a way to give access to that without making a user an admin?
0
votes
1answer
43 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
99 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' => __( ...
3
votes
1answer
72 views

How to Structure a New Role/Capability Scheme?

I have a situation where I need users to be flagged as "Instructors" on a site. That role should basically be whatever the user's current role is with the added capability to see comments from ...
0
votes
0answers
71 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
1answer
24 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 ...