WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 months ago

#37775 new defect (bug)

Capabilities inconsistence when registering CPT

Reported by: slaFFik Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords:
Focuses: Cc:
PR Number:

Description

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.