if ( !$user_id )
$user_id = (int)$post->post_author;
// This is to stop infinite loops with Donncha's sitewide tags plugin
if ( !empty( $bp->site_options['tags_blog_id'] ) && (int)$blog_id == (int)$bp->site_options['tags_blog_id'] )
return false;
// Don't record this if it's not a post
if ( !in_array( $post->post_type, apply_filters( 'bp_blogs_record_post_post_types', array( 'post' ) ) ) )
return false;
$is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
if ( 'publish' == $post->post_status && empty( $post->post_password ) ) {
if ( $is_blog_public || !is_multisite() ) {
// Record this in activity streams
$post_permalink = get_permalink( $post_id );
if ( is_multisite() )