REST API: Consider removing `karma` from Comment endpoint
|Reported by:||dd32||Owned by:||rachelbaker|
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.
Change History (15)
- Keywords needs-unit-tests added
- Keywords has-unit-tests added; needs-unit-tests needs-refresh removed