[wp-trac] [WordPress Trac] #42138: Pass post ID into assign_terms checks

WordPress Trac noreply at wordpress.org
Mon Oct 9 13:35:19 UTC 2017


#42138: Pass post ID into assign_terms checks
-----------------------------------+------------------------------
 Reporter:  johnjamesjacoby        |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Taxonomy               |     Version:  3.0
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  2nd-opinion => 2nd-opinion has-patch


Comment:

 Replying to [ticket:42138 johnjamesjacoby]:
 > * `current_user_can()` supports multiple `$args`, so an
 `assign_term_to_post` could, in theory, accept both the post ID and term
 ID at the same time, though nothing in core takes advantage of this yet.

 Post meta checks make use of this. AFAIK it's the only place in core that
 does. https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/capabilities.php?rev=41322&marks=307#L304

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


More information about the wp-trac mailing list