[buddypress-trac] [BuddyPress Trac] #8150: Getting the blog avatar should be possible outside a blogs loop

buddypress-trac noreply at wordpress.org
Wed Oct 23 21:12:33 UTC 2019


#8150: Getting the blog avatar should be possible outside a blogs loop
--------------------------+---------------------
 Reporter:  imath         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.0.0
Component:  Blogs         |     Version:  2.4.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------
Description changed by imath:

Old description:

> Testing the new Blocks REST API Endpoints, I've noticed the
> `prepare_item_for_response()` method was missing the blog avatar.
>
> Looking at the Blogs component, I've then noticed the
> `bp_get_blog_avatar()` function was requiring the `$blogs_template`
> global to be set to fetch the blog avatar, which makes it unusable by the
> BP REST API.
>
> The attached patch makes it possible to get the blog avatar outside the
> Blogs loop.

New description:

 Testing the new Blog REST API Endpoints, I've noticed the
 `prepare_item_for_response()` method was missing the blog avatar.

 Looking at the Blogs component, I've then noticed the
 `bp_get_blog_avatar()` function was requiring the `$blogs_template` global
 to be set to fetch the blog avatar, which makes it unusable by the BP REST
 API.

 The attached patch makes it possible to get the blog avatar outside the
 Blogs loop.

--

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8150#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list