[wp-trac] [WordPress Trac] #16714: Introduce capabilities for adding new posts
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 1 12:41:13 UTC 2011
#16714: Introduce capabilities for adding new posts
-----------------------------+-----------------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Role/Capability | Version:
Severity: normal | Keywords: dev-feedback
-----------------------------+-----------------------------
Many plugins need to be able to deny the creation of new items,
particularly for CPT use cases. Unfortunately this is not easy to do.
I am suggesting a new cap for adding posts. Obviously, this has the
potential to break quite a number of custom roles, but I think we can
avoid that.
Instead, it would by default simply map to edit_posts. It wouldn't
actually get assigned to any roles, so it's more or less a meta cap.
(Only, without an $id, because it'd be a new post even pre-auto-draft in
some cases.) But it then opens up the ability for this to be filtered by a
plugin.
We could also potentially add this to the CPT capabilities array, but with
the default being 'add_posts' => 'edit_posts'. Ultimately there are a few
ways to implement this.
Ideally, the cap should be used for the admin menu, for post-new.php, for
the 'Add New' button (no more clunky hiding it via CSS), XML-RPC, and the
post handler for post-new.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16714>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list