Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile picture update

  • @mrky007

    Participant

    Hi,

    I have two questions:

    1. When user updates their profile picture I can see: “Username changed their profile picture” message in activity stream. Is it possible to display new profile picture in the activity?

    2. If not, is there a way to remove these type of updates from the activity stream?

    Thanks for your help

Viewing 2 replies - 1 through 2 (of 2 total)
  • @shanebp

    Moderator

    This approach won’t remove existing ‘profile pic’ updates, but will prevent new ones from being created.

    function mrky_dont_save_some_activity( $activity_object ) {
    
        $exclude = array( 'new_avatar', 'updated_profile' );
    
        if( in_array( $activity_object->type, $exclude ) )
            $activity_object->type = false;
    
    }
    add_action('bp_activity_before_save', 'mrky_dont_save_some_activity', 1, 15 );

    @mrky007

    Participant

    Thanks @shanebp, tried it out and it works perfectly!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Profile picture update’ is closed to new replies.
Skip to toolbar