BuddyDev

Search

[Resolved] Filtering profile activity

  • Participant
    Level: Enlightened
    Posts: 69
    Christopher Niedzwiecki on #6611

    A couple days ago I you guys helped me figure out how to filter the sitewide activity without effecting the profile activity. Now I would like to filter just the profile activity. Is there anything I can do to this code to make it only effect the profile activity.

    function bpex_bp_activity_types( $retval ) {

    if( ! bp_is_activity_directory()) {

    return $retval;
    }

    if ( bp_is_active( ‘activity’ ) ) {

    // list of all BP activity types – remove or comment those you won’t show.
    $retval[‘action’] = ‘
    //activity_comment,
    //activity_update,
    // bbp_topic_create,
    // bbp_reply_create,
    //friendship_created,
    //created_group,
    //joined_group,
    //last_activity,
    //new_avatar,
    new_blog_post,
    //new_blog_comment,
    //new_member,
    //updated_profile
    ‘;

    return $retval;

    }
    }
    add_filter( ‘bp_after_has_activities_parse_args’, ‘bpex_bp_activity_types’ );

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #6617

    Hi,
    You can use

    
    if( ! bp_is_user_activity() ) {
    return $retval;
    }
    
    

    this time. Hope that helps.

  • Participant
    Level: Enlightened
    Posts: 69
    Christopher Niedzwiecki on #6637

    Got it :D! Thanks a lot.

The topic ‘ [Resolved] Filtering profile activity’ is closed to new replies.

This topic is: resolved