fine-grained capabilities for user related capabilities
fine-grained capabilities for user related capabilities
fine-grained capabilities for user related capabilities
Role and Capabilities: How do I allow user role to access theme options without enabling ‘manage_options’?
nmr, thanks for your suggestion. So finally had a chance to go back and do some more testing. Using your suggestion, I realized that I was missing a custom capability for my custom taxonomy. Not sure what happened to it as everything was working before my update to 5.1.1 but anyway, I found the one … Read more
How to give custom roles the capability to edit one Menu instead of every Menu
This happens because on every page load you call remove_role As the docs note: When a role is removed, the users who have this role lose all rights on the site. Roles are not like post types, they exist in the database, and removing/adding a role updates the database. For that reason you shouldn’t add … Read more
The issue is that an empty return value from map_meta_cap will grant all users permission to do that thing, because that’s essentially the same thing as saying “no capabilities are required to do this”. What you really want to do is just add edit_special_page to the existing list of required capabilities: add_filter( ‘map_meta_cap’, function( $caps, … Read more
Create a Capability category to group a few custom Capabilities
As is often the case, the answer lies in the documentation. In the documentation for register_post_type() you’ll see: ‘capability_type’ (string) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities, e.g. … Read more
There isn’t one. In the classic editor the post status can be changed in the Publish box. There’ll be a small Edit link next to where it says “Status: Published”. In the block editor, the post status is determined by the date and visibility set in the Status & Visibility box, under the Document Tab, … Read more
You cannot find the capability because it does not exist. In WP out of the box, the paradigm is not post creation, but post publishing. Users can be adjusted to edit and create drafts and pending posts, but not publish. Setting users to only edit however is not possible at the roles and capabilities level, … Read more