xprofile_new_avatar_activity_new

The BuddyPress cover xprofile new avatar activity function.

Description

xprofile_new_avatar_activity_new(); 

Usage

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

Defined (1)

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

/bp-cover.php  
  1. function xprofile_new_avatar_activity_new() { 
  2. global $bp; 
  3. if ( !function_exists( 'bp_activity_add' ) ) 
  4. return false; 
  5. $user_id = apply_filters( 'xprofile_new_avatar_user_id', $bp->displayed_user->id ); 
  6. $userlink = bp_core_get_userlink( $user_id ); 
  7. bp_activity_add( array( 
  8. 'user_id' => $user_id,  
  9. 'content' =>bp_cover_get_avatar_scr() ,  
  10. 'action' => apply_filters( 'xprofile_new_avatar_action', sprintf( __( '%s uploaded a new profile picture', 'buddypress' ), $userlink ), $user_id ),  
  11. 'component' => 'profile',  
  12. 'type' => 'new_avatar' 
  13. ));