[wp-trac] [WordPress Trac] #30991: Post type object capability 'delete_posts' is referenced in the posts list table but does not exist unless 'map_meta_cap' is set to true for post type
WordPress Trac
noreply at wordpress.org
Tue Feb 10 05:43:05 UTC 2015
#30991: Post type object capability 'delete_posts' is referenced in the posts list
table but does not exist unless 'map_meta_cap' is set to true for post type
-------------------------------+-----------------------------
Reporter: bamadesigner | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Posts, Post Types | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: administration
-------------------------------+-----------------------------
Changes (by dd32):
* milestone: 4.1.1 => 4.2
Comment:
Although this is new in this location, it's not a new notice, you'll also
see this in the Publish metabox for unpublishes CPT's, and probably a few
other places.
WordPress assumes that certain capabilities will be set, `delete_posts` is
one of them. I'd suggest that instead of adding isset() checks, we should
pre-define these as `do_not_allow` in `get_post_type_capabilities()` when
not provided by the CPT registration.
I'm shifting to 4.2 based on that, as this doesn't cause any negative
issues, and is really a good reminder to developers to assign capabilities
when they're not using the builtins.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30991#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list