Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#37775 new defect (bug)

Capabilities inconsistence when registering CPT

Reported by: slaffik's profile slaFFik Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:


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

Change History (1)

Note: See TracTickets for help on using tickets.