[wp-trac] [WordPress Trac] #51181: Capabilities arg for register_taxonomy() inneffective on non-hierarchical taxonomies

WordPress Trac noreply at wordpress.org
Fri Dec 18 11:26:23 UTC 2020


#51181: Capabilities arg for register_taxonomy() inneffective on non-hierarchical
taxonomies
-----------------------------+------------------------------
 Reporter:  jerclarke        |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Taxonomy         |     Version:
 Severity:  minor            |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by megphillips91):

 I would like to propose that we take a look at how roles and capabilities
 interact with taxonomy terms. (If this exists in core and I have missed
 it, please point me in the right direction.)

 Take for instance my newspaper client - she manages the paper by section
 (i.e. hierarchal categories). I have not found an elegant way to limit an
 editor's access to edit and delete articles based on the section-category
 of the newspaper.

 A specific example is the watersports section vs. news. The watersports
 section editor is a pro surfer. He doesn't edit news, and should not have
 access. This is a common use case. Editors manage sections of blogs and
 newspapers.

 There is much chatter within sites like stack overflow about ways of
 handling this simply within UX using JS, but that is not the best way in
 my opinion. The expected behavior is that WP Core would just do that
 already.

 I would like to be able to use the Roles and Capabilities API to limit
 edit_posts, delete_posts,  delete_others_posts, and edit_others_posts by
 term value as I can with a custom post type.

 Example:

 {{{
 add_cap("edit_posts_term_term_id)
 }}}

 Does this already exist within core?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51181#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list