bp_cover_get_image_scr

The BuddyPress cover bp cover get image scr function.

Description

bp_cover_get_image_scr( (constant) $user_id = false ); 

Parameters (1)

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

Usage

  1. if ( !function_exists( 'bp_cover_get_image_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_image_scr($user_id); 
  9.  

Defined (1)

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

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