[wp-trac] [WordPress Trac] #39725: Post Type Capabilities Broken
WordPress Trac
noreply at wordpress.org
Sat Apr 15 12:59:11 UTC 2017
#39725: Post Type Capabilities Broken
-------------------------------+---------------------------------
Reporter: michael.ecklund | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 4.7.2
Severity: normal | Resolution: invalid
Keywords: | Focuses: ui, administration
-------------------------------+---------------------------------
Changes (by johnbillion):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Thanks for the ticket, @michael.ecklund.
I narrowed down the problem to the existence of three meta capabilities in
your `capabilities` array:
{{{
$args['capabilities']['edit_post'] = 'edit_post';
$args['capabilities']['read_post'] = 'do_not_allow';
$args['capabilities']['delete_post'] = 'do_not_allow';
}}}
These are singular form meta capabilities, which shouldn't be defined in
your capabilities array. They map to the `edit_posts`, `read_posts`, and
`delete_posts` primitive capabilities respectively. If you remove these
from your capabilities array, the functionality you're attempting to
create appears to work as expected.
Let me know if this works for you.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39725#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list