[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
Mon Mar 23 03:19:39 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:  reviewing
 Priority:  normal             |   Milestone:  Future Release
Component:  Posts, Post Types  |     Version:  4.1
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:  administration
-------------------------------+-----------------------------

Comment (by dd32):

 @nacin might be able to give some input here, as #14122 implemented a lot
 of the logic around this.

 As far as I can see, it's a developer error to not set `delete_posts` in
 the capabilities array, and leave `map_meta_cap` as false.

 The more I look at it, the more the patch seems correct, even though we
 shouldn't need to. The other option is that using `delete_posts` in that
 context could be seen as wrong to start with.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30991#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list