@tkuron
8 years, 8 months ago
I managed to fix the issue.
Apparently BuddyPress does not change the avatar url when get_avatar_data() -function is called. I managed to fix the issue by adding following piece of script to my plugin’s source code:
<?php add_filter("get_avatar_data", function($args, $id_or_email){ $bp_avatar_url = bp_core_fetch_avatar([ "html" => false, "item_id" => $id, "type" => "full", "width" => $args["size"], "height" => $args["size"] ]); $bp_avatar_url = htmlspecialchars_decode($bp_avatar_url); $args["url"] = $bp_avatar_url; return $args; }, 10, 2); ?>
That does not seems to help me with this issue… I still get the Gravater image. I don’t have a foggiest idea why it does do that on my plugin.