Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Fine Tuning › Child Themes › How to search for all occurences of a Buddypress function and replace them
- This topic has 2 replies, 3 voices, and was last updated 2 years, 11 months ago by Themosaurusrex.
-
AuthorPosts
-
FernandoParticipant@chalogr
- 4 Topics
- 4 Posts
I need to search for all occurrences of bp_core_fetch_avatar() and replace them with get_avatar(). This is because I will assign profile pictures (avatars) to my website through an API.
Do you know where these occurrences can be found within the templates? If not, what tool do you suggest using to find them? this is the last issue I need to solve to get the website up and running, help would be greatly appreciated. I know a simpler solution would be to find a Buddypress function to change avatar with PHP code, but apparently, they haven’t implemented this (neither has WordPress, although I created my own custom solution for this), which is honestly a little ridiculous, as this is a very basic process I would expect from any framework.
Cheers, Fernando from Just Game
April 23, 2021 at 21:23 #30978@themodactyl- 0 Topics
- 6297 Posts
Hi Fernando,
Thanks for getting in touch! We’ve received your request and we’ll get you an answer as soon as possible. 🙂
We really thank you for your patience!
In the meantime, feel free to check out our documentation resources for more help:
Kind regards,
April 26, 2021 at 15:52 #31033@themosaurusrex- 0 Topics
- 2048 Posts
Hi Fernando,
Thank you for your question.
You should find most occurrences from any BP function in BuddyPress itself or Grimlock for BuddyPress. This other plugin should be located in
wp-content/plugins/grimlock-buddypress
.Please note that we advise against writing any code directly in those plugins to prevent future updates from erasing all your changes. You should consider creating your own plugin and hook the required filter:
http://hookr.io/filters/bp_core_fetch_avatar/For more about filters, please also read the following post:
https://www.wpbeginner.com/glossary/filters/Best,
April 27, 2021 at 12:30 #31057 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘How to search for all occurences of a Buddypress function and replace them’ is closed to new replies.