[wp-trac] [WordPress Trac] #38412: cannot update or delete user, term or comment meta via REST API

WordPress Trac noreply at wordpress.org
Thu Oct 20 13:26:23 UTC 2016


#38412: cannot update or delete user, term or comment meta via REST API
--------------------------+-----------------------------
 Reporter:  tharsheblows  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The capability checks used when updating meta for all object types are
 currently "edit_post_meta" which doesn't work for users, terms or
 comments. Adding in eg "edit_user_meta" is straightforward, however this
 and the other object type capabilities don't exist. (see #38303)

 Attached is a patch which could be used if those capabilities did exist,
 otherwise we'll need to work around them. That's possible, just need to
 remember to `apply_filters(auth_{$object_type}_meta_{$meta_key});` as
 these can be added in `register_meta()`

 I think it'd make sense to fix it properly now though.

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


More information about the wp-trac mailing list