[wp-trac] [WordPress Trac] #35614: Cannot check capabilities on single taxonomy terms
WordPress Trac
noreply at wordpress.org
Tue Jan 26 03:44:56 UTC 2016
#35614: Cannot check capabilities on single taxonomy terms
-------------------------------------+-----------------------------
Reporter: johnjamesjacoby | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion | Focuses:
-------------------------------------+-----------------------------
Changes (by boonebgorges):
* milestone: Awaiting Review => Future Release
Comment:
+1 to the idea of more fine-grained caps for taxonomy terms, for more
flexible development. I don't know that there's a need in core for this at
the moment, since Terms don't have the same sorts of properties that
dictate caps for Posts (think: authorship, `post_status`, revisions). But
this is partly a chicken/egg problem - we don't have these things because
we don't have the infrastructure.
There are a couple of directions we could move here, using post caps as a
boilerplate. First, post caps are on a per-post basis - this is what
you're referencing here. Second, post caps are, by default, named after
the current post type, and we could do the same thing with taxonomies. It
might make sense to do both of these at the same time, as it would be
easier to port from the post_type system.
Here's the beginning of what a patch would have to have:
1. As noted above, default mappings for singular caps in
`register_taxonomy()`.
2. Singular cap mapping in `map_meta_cap()`, accompanied by unit tests.
3. Convert existing `current_user_can()` checks to singular checks, as
appropriate.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35614#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list