Skip to:
Content
Pages
Categories
Search
Top
Bottom

parse_args messup recent (sitewide) posts widget?

  • @djsteveb

    Participant

    I tried added a slightly modded version of the parse_Args thing @danbp posted here:

    https://buddypress.org/support/topic/how-to-hide-forum-topics-and-replies-but-now-mentions-in-activity-feed/#post-242486

    to thin out the activity stream.. and now the widget I have in sidebar that was showing sitewide posts from member blogs is showing stuff that is in the activity stream like “member x joind group b”

    Is this something that is supposed to happen, a side effect of using the parse args mucking with the site tracking that the recent posts widgets gets / pulls from?

    Maybe I messed up the code to filter the activity stream and this is my created bug – or maybe doing things this way does indeed affect the other?

    my bp-custom.php:

    
    <?php
    // hacks and mods will go here
    define( 'BP_DEFAULT_COMPONENT', 'profile' );
    function remove_xprofile_links() {
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );
    }
    add_action( 'bp_init', 'remove_xprofile_links' );
    // block activity stream stuff - things to include
    function demo_parse( $retval ) {
    	// existing BP/bbP activities
    	// remove the one you wont to see from that list
    	$retval['action'] = '
    		activity_comment,
    		activity_update,
    		bbp_topic_create,
    		joined_group,
    		last_activity,
    		new_avatar,
    		new_blog_post, 	
    		new_member,
    		updated_profile,
    		rtmedia_update,
    		bp_doc_created,
    		new_groupblog_post,
    		bp_album_picture,
    		added_group_document,
    		new_blog_comment,
    		new_member,
    		created_group,
    	';	
    
    	return $retval;
    	
    	}
    add_filter( 'bp_after_has_activities_parse_args', 'demo_parse' );
    // block activity stream stuff removed friendship_created, new_avatar,bp_doc_edited,activity_liked,
    // deleted_group_document, new_blog, new_forum_post, new_forum_topic, new_status,new_wire_post
    // previously blocked via plugin - deleted_group_document, new_blog, new_member, joined_group, friendship_created, activity_liked
    ?>
  • The topic ‘parse_args messup recent (sitewide) posts widget?’ is closed to new replies.
Skip to toolbar