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

Sync roles across several plugins

Here is the setup: I am implementing Wordpress with two specific plugins: Ultimate Members and Yith Vendors which is a woocommece addon. What I need to do is change a field's data in the database ...
1
vote
1answer
17 views

REST API: How can I restrict a custom post type to only be accessible by authenticated users?

I have a custom post type configured to be accessible via the WP Rest API v2. How do I lock the access to this custom post type so that only the authenticated users can perform GET requests?
1
vote
1answer
33 views

Custom role capabilities to administrator not taking effect (no plugin)

I have created a custom post type from a plugin. I added a capability type teacher. Then I have added custom capabilities to administrator. But the problem is for the first time after completing this ...
4
votes
2answers
99 views

Change capability type of post type registered by plugin

I'm using the plugin Custom CSS JS which registers it's own post type but the capability is assigned to "post". I want to change it to "manage_options". Is there a correct way without altering the ...
0
votes
0answers
15 views

Allow user to edit same category posts published by other user

Is it possible to allow user edit their own posts and also posts that are published in same category by other users?
0
votes
0answers
14 views

Creating a project management plugin, projects are only seen/managed by admin

I went to make a WordPress plugin to manage my projects. I don't want to make my projects as public, only I(super_admin) should be able to see/manage it. Here is what I need: Adding Client ( as CPT ...
0
votes
0answers
11 views

Remove QE options and edit link from the title for a custom status and based on capability without js

I'm trying to remove the quick edit option and the edit link on the title of the post in the admin post list. I'm trying to do that on user capability and a custom status. Basicly when a post have ...
0
votes
1answer
22 views

How to restrict author to only access one custom post type ?

My installed Wordpress have 4 custom post type and 1 default post type. Basically what i want is that the author can also access particular one custom post type. Author must not see other post types.
1
vote
0answers
14 views

Allow users to set a post author

I have a website owned by myself that allows people to submit work for us to publish. I have a team of staff who need to create posts..etc I have assigned users the author role which allows them to ...
0
votes
1answer
15 views

How to add a menu page for options in wordpress for user that has the role of vendor?

I want to add new options page ONLY for those users whose role is vendor. How can I do that? This is my current code. add_action('admin_menu', 'business_settings_menu'); function ...
1
vote
0answers
21 views

Filtering posts by user role [closed]

I have created some custom roles in my Wordpress installation. Now I want to filter the posts they can see and edit based on a custom field criteria. How can I define this behavior in a custom user ...
1
vote
0answers
43 views

Cannot Create new Post within Custom Post Type

I have a custom post type registered and when registering I am using... if( !post_type_exists( 'email_template' ) ) { register_post_type( 'email_template', array( ...
0
votes
1answer
30 views

Force “submit for review” on update?

I'm trying to force all content to be submitted for review. That means that if a user updates an already published page, that the update would be pending until someone else approves it. I don't see ...
0
votes
1answer
17 views

Run only on plug-in activation instead of wp_head

I have below function on my plugin which adds more capabilities to current user. // Role setting for add media function wh_edit_roles(){ if ( current_user_can( 'edit_posts' ) ){ $user = ...
0
votes
0answers
20 views

what is 'capability_type' and 'capabilities' for 'register_post_type'?

My English sucks..I dont understand what the 'capability_type' and 'capabilities' do in 'register_post_type' after reading the codex.Is it for the admin or for the reader?and what exactly does those ...
0
votes
0answers
28 views

How to add 'Site Identity' capabilities to customisation for editors

I was able to give most capabilities to editors for the Customisation. However I'm lacking the Site Identity capability. I found this thread How to change in customizer the "site ...
0
votes
0answers
14 views

Custom role cannot upload media in new custom post page

Sorry if this question is duplicated. It seems to be similar to this question (Custom post type media upload error with custom user role) but I couldn't make it work. I have a custom role called ...
0
votes
1answer
28 views

Using media-upload.php - requires user to have edit_posts capability?

I'm integrating an image upload action, on the options page for my plugin. It works, but the thickbox dialog sits with a message "crunching" and never completes. Checking the console in Firebug ...
0
votes
1answer
31 views

Admin custom option screen not saved unless user manage_options capability

I am running into exactly the problem described by this Trac: https://core.trac.wordpress.org/ticket/14365 I see that one of the devs added a Diff here: ...
0
votes
2answers
37 views

Limit role to one plugin [duplicate]

Is there a way to do this without using another plugin and without modifying WP core code: I want to give the custom plugin I am writing a settings page. So I will need to add plugin capabilities to ...
0
votes
0answers
28 views

Custom user role capabilities for Custom Post Type

I've created a custom user role using WPFront User Role Editor to allow access to only one Custom Post Type (job_listing, job_listings). It works almost great, however, it's not displaying "All Job ...
0
votes
2answers
353 views

How to change in customizer the “site identity” tab required capabilities

I'm building a multisite in which site admins have no "manage options" capability. The problem is that withut this cap they cannot see the "site identity" tab in the customizer, where they can change ...
1
vote
0answers
19 views

Allow user to only access custom post type

I am starting to get comfortable with Custom Post Types, but I don´t get the capabilities for them right. I have something like this: // define capabilities... $capabilities_werden = array( ...
0
votes
0answers
27 views

user_has_cap filter crashes site when doing get_posts()

I can not understand why the site is crashing when adding this block of code: function demo_function( $capabilities ) { global $pagenow; if ( $pagenow != 'post-new.php' ) { ...
0
votes
1answer
27 views

Changing capability type without altering plugin

This is probably easy but if someone could help me that would be great: I'm planning on using the "Reusable Text Blocks" plugin on several Wordpress sites. I'm going to use this on sites that only ...
0
votes
1answer
50 views

Wp custom post custom capability not working togather

I am trying to make a custom post type editable by a group of people (i.e. The users department) instead of only the author. I don't want to let them edit posts created by people of other ...
1
vote
0answers
34 views

Allow editor access to Tools->Available Tools admin tab

I was looking for a way to allow Editor Role to access the Tools->Available Tools admin panel. I found that https://codex.wordpress.org/Administration_Panels#Available_Tools describes how to access ...
4
votes
1answer
127 views

What do unfiltered_html and unfiltered_upload actually filter?

Among WordPress' capabilities are unfiltered_html and unfiltered_upload, however I have yet to find any documentation about what specifically they allow or prevent in their filtering. The only ...
1
vote
1answer
55 views

What capability allows someone to change a page's/post's author?

I know that by default that administrators and editors can change the author of a page/post, but those with an author role can't. What role capability allows this? Is there a way to give this ...
1
vote
1answer
100 views

current_user_can() return FALSE but debugging says TRUE

BACKGROUND I have created a must-use plugin where I keep general functions. Like register_post_type(). Here I've created several Custom Post Types. With the help of several really good posts, I ...
0
votes
0answers
18 views

how to create page using add_menu_page?

how to create a new page in the administration menu, which will include (appearance -> header) and (Settings -> General) on one page?
1
vote
0answers
35 views

How to restrict access to specific pages on the back-end?

Before anything... I understand how roles and capabilities work. And there are tons of plugins that help you manage those. Roles and capabilities can only be so specific though. Is there "wordpress ...
0
votes
1answer
23 views

Let editors view post in admin but not be able to perform a save/edit

In a current project I need to be able to restrict access to posts by comparing the post's language against the languages a user has access to. This, I'm certain I can achieve. However, even if a ...
0
votes
0answers
26 views

Are dashboard widget settings global?

I followed the example of how to create a create a dashboard widget from WordPress' site to make a widget that reads an RSS feed and displays the items (yeah I know there are plugins that do this but ...
10
votes
3answers
327 views

What is valid timing of using current_user_can() and related functions?

During the vanilla WP core load the current user is being set up in $wp-init() which is after theme load and before init hook. This is in line with good practice of functionality getting hooked to ...
0
votes
1answer
15 views

Weird capabilities / roles behavior

I've been playing with the custom post types capabilities and some behaviors remains really mysticals for me. The Setup Say you have a Custom Post Type (CPT) called show for defining a radio ...
0
votes
1answer
60 views

Add capability to a role , so user is only able to view his own posts

I have created a user role vendor. Right now i am able to give the capabilities to the users, to be able to only edit,delete etc But then the user sees all the posts irrespective of who is the ...
0
votes
0answers
26 views

Wordpress Premium Access

I'm new to PHP and Wordpress. I actually achieved pretty much until now, but now I just cant figure out how to do one thing: Grant registered users access to "Additional Content", I don't know why, ...
0
votes
0answers
87 views

Front-end Posting: Allowing user to view/edit their pending post

So, I have a front end set up. I can write and submit a post. I have a list of my published and pending posts, which I can view and edit as an admin. I created a subscriber, but 'he' cannot access ...
1
vote
2answers
30 views

Restricted user capabilities cannot add image

I have restricted a users capabilities $capabilities = array( 'delete_posts' => true, 'delete_published_posts' => true, 'edit_posts' => true, ...
0
votes
1answer
725 views

current_user_can( 'edit_post', $post_id ) does not work for contributer but for administrator

I have a custom post type named ÷project÷ which has 'capability_type' => 'post' while registering using ÷register_post_type÷. in my theme files and also functions.php file, I have situations where ...
0
votes
0answers
169 views

get user role value as a string from wp usermeta table into custom script

Just came accross while retriving wp_capabilities from wp_usermeta table, this returns serialize output a:1:{s:13:"administrator";b:1;} When i unserialized, it gives an array Array ( ...
2
votes
1answer
103 views

Shold I manually add 'cap' to admin role ?

I've created a role: $role = add_role( 'role', 'role', array('read' => true) ); and so created a cap: $role->add_cap( 'cap' ); after this I'd created a submenu in admin menu with 'cap' as ...
0
votes
0answers
23 views

Adapt capabilities to specific users “IF”

I have a very specific issue with my Wordpress website. I use custom fields to assign some users to "group managers" and would like to prevent other "group managers" to change this custom field. ...
0
votes
0answers
7 views

Permissions links manager wordpress

I want to let the "Subscriber" users to add\edit\delete links but I don't want that the user could delete other user's links. I know the "manage_links" capability but I can's "split" this to ...
1
vote
0answers
25 views

Where are $current_user->allcaps set?

I recently found a problem with WP in which even the admin has no permission to get to anything on /wp-admin/. Oddly enough, when I compared the $current_user->allcaps to those on a normal site, I ...
0
votes
2answers
58 views

same user role or copy the user role to be same as the other role

how do you make the user role "contributor" to be same as the user role "seller" by using functions.php I've tried user role editor, but it seems to be the dokan multivendor plugin has set only into ...
1
vote
1answer
61 views

Custom post type submenu capabilities - custom plugin

I'm trying to add new custom capability so I can hide custom post type from non admins. In my custom post type I have some custom taxonomies and then 2 submenus. The administrator can see the menu of ...
0
votes
1answer
46 views

How to get a users list by who created them?

I have two users with the capability to create other users. But their roles are not same. Tom - Role is Administrator Jackie - Role is CMS Manger (a custom created role) Both have capability ...
2
votes
1answer
50 views

Let new user role to 'edit_others_posts' of other user role, not of its own type

In my system, I'm making two new roles: Third Party (TP) (lesser privileges) Data Entry Operator (DEO) (powerful over Third Party - but not of its own group) My CPT 'capabilities' parameter is ...