bp_cover_refresh

The BuddyPress cover bp cover refresh function.

Description

bp_cover_refresh(); 

Usage

  1. if ( !function_exists( 'bp_cover_refresh' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-cover/bp-cover.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_cover_refresh(); 
  7.  

Defined (1)

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

/bp-cover.php  
  1. function bp_cover_refresh() { 
  2. global $bp; 
  3. $user_id=$bp->displayed_user->id;  
  4. if(empty($user_id)) 
  5. return false;  
  6. $image=get_user_meta($user_id, 'bp_cover', true);  
  7. $filter = " <div class='image-upload-container'> 
  8. <img class='img-profile-header-background' id='user-banner-image' 
  9. src='$image'width='100%' style='width: 100%;'> </div>";  
  10. echo $filter;  
  11. die(); 
  12. }