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
85 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
763 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
300 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
365 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
220 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
896 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
369 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
603 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
147 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
65 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
66 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
250 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
1k 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
364 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
3k 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
89 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
250 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
555 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
137 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
94 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
531 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
193 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
1k 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
769 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
336 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 ...
0
votes
1answer
48 views

Best Roles and Capability on a site with review features using a front end custom post

I'm working on a Movie Blog site, I'll be having a movie review for site members and planning to create/install plugin that can create a front-end post/edit using a custom post type for that reviews. ...
0
votes
1answer
78 views

User: Editor, can't see edit taxonomy screen

For some reason the Editor role does not get access to the edit taxonomy screen on my site. Maybe that is expected behavior, I dont know - But how can I add this to the editor role capabilities?
2
votes
1answer
1k views

Role Capabilities: Add New Ones?

I'm trying to create a private type of community ... and the current Capabilities are great, except for the fact that I don't want users of a certain Role being able to see anything that someone else ...
4
votes
1answer
523 views

Restrict Admin Capabilities in MultiSite

update_core update_plugins update_themes install_plugins install_themes delete_themes edit_plugins edit_themes Hi, I want to restrict those capabilities to user_id = ...
1
vote
1answer
132 views

Organize WordPress site, so it can maintain with huge database

Intro: Hello, I am making coupon website and I need an advise. So, the structure at the moment is like this: Coupons ( posts ) Categories of coupons ( categories ) Shops ( tags ) In the near ...
2
votes
1answer
438 views

Temporary capability for current_user_can()

Is it possible to intercept calls to current_user_can() ? Example: current_user_can('rate', $post_id) There's no "rate" capability registered, but could I somehow hook into that function and do my ...
3
votes
1answer
567 views

How do I fix problems with users not being able to publish and only submit for review after upgrade of Multisites installation?

We have a previous WPMU installation that has been upgraded to a WordPress Multisites installation. Since upgrading to 3.3.2 from 3.2.1 we have problem with editors/admin not being able to post on ...
0
votes
1answer
1k views

Why is wp-login redirecting to the home page when I use this function?

I'm perplexed; I can't see where I'm going wrong with this code. It should redirect any subscriber-level users back to the site home page if they try to access anything within /wp-admin - but not if ...
0
votes
2answers
1k views

Custom wordpress admin page/url “You do not have sufficient permissions to access this page.”

Here's a custom wordpress admin page I created:- // code located in my custom plugin's php file function my_special_function(){ echo '<div> Hello World </div>'; } function ...
4
votes
1answer
1k views

add_menu_page permissions - what am I doing wrong?

I am running a fresh install of Wordpress 3.3.2 and the only plugin enabled is one I'm developing, but I can't seem to get past a permissions issue in add_menu_page. With the exception of using ...
3
votes
4answers
2k views

Select subscriber as author of post in admin panel?

I want to be able to select a subscriber an author of a post in the admin so it displays their name as having written the post, but I do not want to give them any additional privileges (if they login ...
0
votes
1answer
343 views

insufficient permissions; coding an action for plugin governed by custom capability

I'm working on a modification to WP Super Cache which adds two new capabilities to give more control of restriction to certain features. My goal is to a) allow Editors to see the Delete Cache button ...
1
vote
2answers
97 views

Making a plugin only available on the front-end for the logged in super admin

I made a little plugin that enqueues 1 .js file and 1 .css file into a theme's front-end. All it does it load a grid on top of the theme so I can visualise the design. If this plugin was activated ...
0
votes
2answers
513 views

How to hide plugin options for editors via functions.php

I've read the entry Best Collection of Code for your functions.php file, it really help me a lot. I only got a question, is there a way to hide some plugins options (in their respective ...
1
vote
1answer
254 views

How-to delay the capability to publish posts?

Spam has gotten a bit crazy so it would be nice if new users have to wait a week to post something. I use buddypress and all new members have the role of author. The site is more like a forum with ...
1
vote
1answer
474 views

can't see custom post content filtered under “mine” filter in admin panel

after creating a custom post type with custom post type UI plugin, and after creating the capabilities for a new role to edit, delete and publish it's own custom posts with User Role Editor plugin, ...
2
votes
1answer
145 views

Problem using role_has_cap hook

I'm trying to filter a capability check in order to work around the lack of filters to customize the user edit page in the admin area. But I can't seem to add filters to a hook, and I'm sure I'm ...
0
votes
1answer
343 views

wp_redirect and current_user_can issues

Put simply, I'm trying to redirect the user after clicking a 'Save Changes' button. The plugin uses custom capabilities, and so I want to check the current user has the correct capabilities before ...
0
votes
4answers
3k views

How can I restore admin capabilities?

So yeah, I'm a genius. I managed delete all my admin capabilities (thank you very much Membership plugin). I could restore them, ...if I had admin access, lol. Anywhoo, how can I give all my ...
1
vote
1answer
152 views

How do you set up a WordPress blog with multiple authors to allow something like StackExchange's “community wiki” feature?

I'm thinking about having a blog with multiple authors. In the WordPress Roles documentation, authors can publish posts but only edit their own and not posts by other authors, which is what I'm ...
0
votes
1answer
1k views

Create a User Role with permissions to only upload files to the media library?

Some of the employees at my organization need to be able to upload files to a folder and share a link with others. It’s primarily documents like pictures, pdf’s and Word documents. And instead of ...
6
votes
2answers
5k views

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress ...
2
votes
1answer
227 views

Add user capability and check against it

I just realized the following: // Call the current user info global $current_user; // Add a capability // and set the 2nd argument ($grant) to false $current_user->add_cap( 'some_cap', false ); ...
0
votes
1answer
412 views

User role editor - Add download files capability

I've got User Role Editor plugin installed and i want to add a capability for download files. I've got some downloads in a custom post type called 'products'. I want only people who are logged in to ...