Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity/updates


  • yuravw
    Participant

    @yuravw

    A question about the activity/updates.
    When a user updates their profile photo, this also comes in the activity stream.
    Can I turn that off somewhere?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    Please try following code snippet:

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

    It will stop any new activity of profile pic update but older ones will be there as it is.

    Thanks


    yuravw
    Participant

    @yuravw

    Ehm, maybe a stupid question, but where must I put this code?


    Prashant Singh
    Participant

    @prashantvatsh

    Create a file named bp-custom.php in the plugins folder and then put this code there. For reference: https://codex.buddypress.org/themes/bp-custom-php

    If not able to do it then the easiest way is to install the plugin Code Snippets https://wordpress.org/plugins/code-snippets/ and add a new snippet there, then paste this code.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar