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
144 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' ) ); ...
1
vote
0answers
233 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
572 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
1answer
265 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
134 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
1answer
258 views

How To Create A File Archive in WordPress?

I've installed WordPress for my schools website. I need create a file archive, an uploader and a file viewer for the website. The file archive would store files on the server. The uploader would ...
1
vote
0answers
82 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
59 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
515 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
1k 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
47 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
61 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
787 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
60 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
159 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
77 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
357 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
55 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
84 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
220 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
52 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
241 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
198 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
642 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 ...
0
votes
1answer
107 views

Grant access to admin menu?

I'm trying to grant the user role 'editor' to have access to the Users top-level menu, and then control which sub-menus they have access to. The add_action lives in the _construct method. add_action( ...
0
votes
2answers
1k views

Reset Roles (or undo role changes on theme change)

I am creating a theme that deletes some user roles that are not necessary and creates others. (It deletes author and contributor and renames subscriber). Everything works, but on theme deactivation, ...
3
votes
2answers
454 views

Adding capabilities to super admins

I'm developing a plugin that uses custom capabilities. Some of those capabilities need to be added to all users who are super admins. Currently, I'm using this code: $supers = get_super_admins(); ...
2
votes
1answer
514 views

Limit access to page depending on user level

I've been asked to build a WordPress that limits access to posts with a particular custom post type based on the logged in users level. There will be a number of pre made user roles and they would ...
1
vote
1answer
361 views

Prevent Editors from Editing/Deleting Admin Accounts

I need editors to be able to add/edit/delete other users. Giving them those capabilities is easy with code similar to this: $editor = get_role('editor'); $editor->add_cap('edit_users'); The ...
0
votes
2answers
1k views

Show Welcome Panel on Dashboard for every user

I have customised the welcome panel on the dashboard for users with information in. I then hid the "Dismiss" button and added CSS to make the welcome panel always visible. Using the 'welcome_panel' ...
0
votes
2answers
458 views

Require Capability to View Woocommerce Product

I am using Woocommerce and I have products in a category called B2B whose single_product.php is only to be shown to people with the capability read_b2b. <?php if ( have_posts() ) : ?> <?php ...
2
votes
1answer
1k views

Apply custom role capabilities to administrator (without plugin)

I have a custom role that allows access to only a sigle custom post type. This is all well and good, but now it is only showing up for this role, not for admin and super admin. I'm having a hard time ...
0
votes
1answer
171 views

How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite

At the moment, users with role "Author" can only view but not add or edit polls. "Editor" and "Administrator" (site administrator) can add and edit polls however. This is despite the fact that I ...
0
votes
1answer
70 views

custom post type capabilities - needs to be VERY secure

Hi I'm trying to define custom post type capabilities for staff contracts on an intranet site, so due to the sensitivity of the information this needs to have as best security as possible and simply ...
0
votes
1answer
74 views

how to change capability required to view an admin page? [duplicate]

Possible Duplicate: Hooking into add_submenu_page This plugin uses add_menu_page function to create an admin page and I was wondering is there a way to change the capability that is set by ...
1
vote
1answer
534 views

Pending status by default for a specific role

I would like to prevent users from one specific role from publishing directly their articles. Only administrators should be able to approve these. The only choice they would ever have is to put their ...
1
vote
1answer
2k views

Hooking into add_submenu_page

Ever come across a plugin that is using the manage_options capability for a page that... really doesn't need to be? Well, I've come across just that. This may be more of a general question about ...
0
votes
1answer
512 views

How to restrict specific post types from being read or added by specific user roles (eg. author)?

I'm not very clear how to restrict admin area post types access to specific user roles. In my case, I have some post type such as "suppliers" which I do not want to show to "authors". By default WP ...
7
votes
5answers
4k views

WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins

I have multi-author website and I am not very comfortable for allowing all members to enter SEO details in the posts they are publishing. I would like this would be visible only to Administrator of ...
0
votes
1answer
96 views

Custom post type & role issues

I am having issues with using custom post types and custom user roles. I created a custom post type called Businesses. Then I created capabilities for users of a certain type to be able to add and ...
2
votes
2answers
103 views

Unify the roles and caps?

I installed several plugins(buddypress-docs,achievement,bbpress), each one create capabilities for their own post_type. I would prefer to make all roles and capabilities unified into one system, Is ...
3
votes
1answer
287 views

Restrict users from editing post based on the age of the post

How can I restrict users (based on Capabilities) from editing their published posts after a custom amount of time. For instance, a user that can publish_posts (authors) can not edit a their post if ...
4
votes
2answers
886 views

Add custom user capabilities before or after the custom user role has been added?

Should custom user capabilities be added before the custom user role has been added, or the other way around? add_role() asks for and array of $capabilities in the third parameter of the function. ...
1
vote
1answer
168 views

Is there a capability for managing plugin options?

I have an Editor user that I want to let use a plugin's options without being an Administrator. I can use $user->add_cap but can't tell if any particular capability relates to the permission to edit ...
-1
votes
1answer
113 views

Explanation of User Roles and Capabilities

I'm developing a Wordpress theme. In this theme, there are a few custom post types. Custom Post Types : book article event We are using Wordpress' default user roles (we can create new roles, if ...
0
votes
3answers
758 views

Check whether user can delete a given post

I have run into this problem where the following piece of code always returns true for any post ID supplied to it. current_user_can('delete_posts', $post_id); Normally, the above code should return ...
2
votes
1answer
231 views

Allow Administrator role access to custom capabilities [duplicate]

I'm currently developing a Wordpress business directory plugin with a 'business' custom post type. I have it creating a custom 'business_author' user role on activation and assigning specific ...
2
votes
3answers
2k views

Role that can edit only widgets, not other theme options

How could I make particular role access widgets administration menu (wp-admin/widgets.php), but not access other theme administration menu elements. I have got that far as to display Appearance menu ...
2
votes
1answer
963 views

Wordpress capability_type arguments

I don't know how to figured out what's wrong with my code, Why Custom Post Types "Book" doesn't show on my dashboard, I logged as Admin and I use latest WordPress installed 3.4.1 Here with my code ...
4
votes
1answer
365 views

Custom post type capabilities

I've got a somewhat unique scenario that I would appreciate some assistance with. I have a custom post type, coin, for content that is automatically created by an custom import process. I would like ...