#8150 closed defect (bug) (fixed)
Getting the blog avatar should be possible outside a blogs loop
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 6.0.0 | Priority: | normal |
Severity: | normal | Version: | 2.4.0 |
Component: | Blogs | Keywords: | has-patch commit |
Cc: |
Description (last modified by )
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.
Attachments (1)
Change History (11)
#3
@
5 years ago
Thanks for your feedback @espellcaste
It's a very good point about other functions. I'll also look at it.
This ticket was mentioned in Slack in #buddypress by espellcaste. View the logs.
5 years ago
#5
@
5 years ago
@imath Just to confirm, did we decide to merge this one and update the other functions attachment from blogs_template
?
#9
@
5 years ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 12496:
This is not the only Blog function that is attached to the
blogs_template
. I didn't add this because of this:But I think it is an important change. :)