[wp-trac] [WordPress Trac] #37775: Capabilities inconsistence when registering CPT

WordPress Trac noreply at wordpress.org
Mon Aug 22 21:52:55 UTC 2016


#37775: Capabilities inconsistence when registering CPT
-------------------------------+-----------------------------
 Reporter:  slaFFik            |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 When registering CPT I can define `capabilities`, and some of them can be
 "turned off", so I can disable, for example, creating a new CPT object
 with `'create_posts' => false`.

 But here is the interesting part:

 {{{
 'delete_post'  => null,
 'delete_posts' => false,
 }}}

 To prevent deletion, I need to specify exactly like above, otherwise I
 will get notices from WP.
 In my opinion, we should have 1 approach, like `false`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37775>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list