[wp-trac] [WordPress Trac] #38821: REST API: Consider removing `karma` from Comment endpoint

WordPress Trac noreply at wordpress.org
Wed Nov 16 13:13:40 UTC 2016


#38821: REST API: Consider removing `karma` from Comment endpoint
--------------------------+--------------------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.7
Component:  Comments      |    Version:
 Severity:  normal        |   Keywords:  2nd-opinion dev-feedback
  Focuses:  rest-api      |
--------------------------+--------------------------------------
 The Comments API currently exposes the core `comment_karma` field, which
 WordPress hasn't internally used for at least 8 years now.

 The `comment_karma` field can only be set by users with the
 `moderate_comments` cap - this is a new precedent for WordPress in that
 regard, as we don't set that field anywhere. It's not exactly possible
 (although it can be assumed quite easily) to know which users should (or
 shouldn't) be allowed to access the field.

 I'd like to propose that we skip shipping this as part of the comments api
 (setting/viewing/querying) - it's a late change, but it's a vestige from
 WordPress's past (that even I couldn't find a ticket reference for) which
 has only been used by plugins (if anything) in the last decade. It should
 be up to those plugins to expose this field in whatever makes sense for
 them.

 Attached is a patch that just removes it from the endpoint.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38821>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list