bp_get_blog_avatar_<blog_blog_id>

In future BuddyPress versions you will be able to set the avatar for a blog.

Description

apply_filters( 'bp_get_blog_avatar_<blog_blog_id>', (unknown) $avatar ); 

Right now you can use a filter with the ID of the blog to change it if you wish. By default it will return the avatar for the primary blog admin.

This filter is deprecated as of BuddyPress 1.5 and may be removed in a future version. Use the bp_get_blog_avatar filter instead.

Parameters (1)

0. $avatar (unknown)
The avatar.

Usage

To run the hook, copy the example below.
  1. $avatar = apply_filters( 'bp_get_blog_avatar_{$blog_blog_id}', $avatar ); 
  2.  
  3. if ( !empty( $avatar ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_get_blog_avatar_<blog_blog_id> callback 
  2. function filter_bp_get_blog_avatar_blog_blog_id( $avatar ) { 
  3. // make filter magic happen here... 
  4. return $avatar
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "bp_get_blog_avatar_{$blog_blog_id}", 'filter_bp_get_blog_avatar_blog_blog_id', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "bp_get_blog_avatar_{$blog_blog_id}", 'filter_bp_get_blog_avatar_blog_blog_id', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/bp-blogs/bp-blogs-template.php  
  1. $avatar = apply_filters( 'bp_get_blog_avatar_' . $blogs_template->blog->blog_id, $avatar );