[wp-trac] [WordPress Trac] #40030: Pass User and Comment Objects to rest_get_avatar_urls
WordPress Trac
noreply at wordpress.org
Thu Aug 16 07:08:23 UTC 2018
#40030: Pass User and Comment Objects to rest_get_avatar_urls
--------------------------+-----------------------------
Reporter: dshanske | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: REST API | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------------
Comment (by pputzer):
Replying to [comment:3 joehoyle]:
> > I wish avatars had a different design, but we're stuck with it.
>
> That's kinda my point, we are _not_ stuck with it in this case, we have
the oppurtinty to make something like `rest_get_avatar_urls_for_user` if
we wanted to; I think.
Having implemented a [https://github.com/mundschenk-at/avatar-
privacy/blob/master/includes/avatar-privacy/components/class-rest-api.php
workaround in Avatar Privacy], you will then also need a
`rest_get_avatar_urls_for_comment` to handle a similar issue in
`WP_REST_Comments_Controller::prepare_item_for_response`. As is, these
functions would each have to reimplement the looping logic. I'm not sure
this is worth the duplication.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40030#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list