bp_cover_get_avatar_scr

The BuddyPress cover bp cover get avatar scr function.

Description

bp_cover_get_avatar_scr( (constant) $user_id = false ); 

Parameters (1)

0. $user_id — Optional. (constant) => false
The user id.

Usage

  1. if ( !function_exists( 'bp_cover_get_avatar_scr' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-cover/bp-cover.php'; 
  3.  
  4. // The user id. 
  5. $user_id = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_cover_get_avatar_scr($user_id); 
  9.  

Defined (1)

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

/bp-cover.php  
  1. function bp_cover_get_avatar_scr($user_id=false) { 
  2. global $bp; 
  3. if(!$user_id&&$bp->displayed_user->id) 
  4. $user_id=$bp->displayed_user->id; 
  5.  
  6. if(empty($user_id)) 
  7. return false; 
  8. $image=get_user_meta($user_id, 'profile_avatar', true);  
  9. $filter .= "<img class='bp-ava' src='$image' />";  
  10. return $filter;