[wp-trac] [WordPress Trac] #35614: Cannot check capabilities on single taxonomy terms

WordPress Trac noreply at wordpress.org
Sat Dec 3 04:58:21 UTC 2016


#35614: Cannot check capabilities on single taxonomy terms
-----------------------------+--------------------------
 Reporter:  johnjamesjacoby  |       Owner:  johnbillion
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:  4.7
Component:  Taxonomy         |     Version:
 Severity:  normal           |  Resolution:  fixed
 Keywords:                   |     Focuses:
-----------------------------+--------------------------
Changes (by dd32):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Replying to [comment:20 kevinB]:
 > As implemented in 4.7 RC, these meta capability checks accept a term_id
 with no taxonomy specified.  This is an issue for legacy installations
 that have term_id != term_taxonomy_id.  Taxonomy determination is now
 slated to fall to WP_Term::get_instance(), which will try to disambiguate
 but may return WP_Error.
 >
 > An obvious option would to require the additional taxonomy argument
 following term_id.  This would cause a fourth item in the $args array
 passed into the 'map_meta_cap' filter - a break with tradition, but not a
 problem for API-compliant plugins in my view.


 I'm punting this to 4.7.1 after chatting with @nacin, I've created #39038
 for that.

 For most sites, terms are likely to be split, and this should be a
 reasonably rare case to be hit.
 In the event that a term isn't split, this will prevent it from being
 edited or deleted at present, not an unreasonable situation  here for now.

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


More information about the wp-trac mailing list