Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity stream items filter


  • Shmoo
    Participant

    @macpresss

    Hi,

    Don’t know if this codex page is still up to date but I’m trying to exclude a bunch of activity stream items from my site.

    Posting Activity from Plugins

    So I made this.

    
    function dont_save_various_activities( $activity_object ) {
    
    	$exclude = array( 'activity_update', 'new_avatar', 'new_member', 'friendship_accepted', 'friendship_created', 'created_group', 'joined_group', 'new_blog' );
    
    	if ( in_array( $activity_object->type, $exclude ) )
    		$activity_object->type = false;
    
    }
    add_action( 'bp_activity_before_save', 'dont_save_various_activities', 1, 1 );
    

    This excludes almost everything from the activity stream but for some reason you can’t target the ‘… profile was updated …’ activity item. That one keeps showing up when some user edits their profile.

    I only want to record, new: blog posts, comments, topics and replies.

Viewing 1 replies (of 1 total)

  • Shmoo
    Participant

    @macpresss

    Looks like in the codex by types the ‘updated_profile’ type is missing.

    Are those all default activity types or are there more?


    Following up question

    I went into the database to check what the last added activity type was and found it at the bottom, but what are those first few rows with last_activity types that belong to the members component?

    Screenshot

    View post on imgur.com

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