Changing default individual & group avatars
-
I had good luck using the following method for changing the default avatars, :
`function my_custom_set_avatar_constants() {
define( ‘BP_AVATAR_DEFAULT’, get_stylesheet_directory_uri() .’/images/default_full_size.png’ );
define( ‘BP_AVATAR_DEFAULT_THUMB’, get_stylesheet_directory_uri() .’/images/default_thumb_size.png’ );
}
add_action( ‘bp_init’, ‘my_custom_set_avatar_constants’, 2 );`But those constants control both group and individual defaults, and I’d like my groups to have a different avatar than my individuals.
Replacing group avatars sort of works following @r-a-y‘s code here: http://pastebin.com/QSWtCJMb . But, it break if you use the groups widget in the sidebar of your groups page; the widget then pulls the full-size default avatars, not the thumbnail size. Anybody know of a good post-BP-1.5 way to do this? It looks in the code like group avatars are handled just like individual avatars except for one bit that sets the directory to search in:
`else if ( ‘group’ == $object )
$avatar_dir = ‘group-avatars’;`Thanks for any help you can give.
- The topic ‘Changing default individual & group avatars’ is closed to new replies.