Re: group default avatar
Here is my code. However, the small group avatar in forum topic directory does not change. This avatar is displayed using bp_the_topic_object_avatar() from bp-forums-templates.php
function my_default_get_group_avatar($avatar) {
global $bp, $groups_template;
if( strpos($avatar,’group-avatars’) ) {
return $avatar;
}
else {
$custom_avatar = get_stylesheet_directory_uri() .’/_inc/images/group_avatar.png’;
if($bp->current_action == “” || $bp->current_action == “my-groups” || $bp->current_action == “invites” )
return ‘group->name ) . ‘” />’;
else
return ‘group->name ) . ‘” />’;
}
}
add_filter( ‘bp_get_group_avatar’, ‘my_default_get_group_avatar’);