bp_is_blog_public

  • apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) )

    Source Reference:

    • Component: BuddyPress :: bp-blogs
      File: /bp-blogs/bp-blogs-functions.php :: Trac Source Line: 171
      	// 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() )
      				$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
      			else
      				$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
      
    • Component: BuddyPress :: bp-blogs
      File: /bp-blogs/bp-blogs-functions.php :: Trac Source Line: 253
      	// If this is a password protected post, don't record the comment
      	if ( !empty( $recorded_comment->post->post_password ) )
      		return false;
      
      	// Don't record activity if the comment's associated post isn't a WordPress Post
      	if ( !in_array( $recorded_comment->post->post_type, apply_filters( 'bp_blogs_record_comment_post_types', array( 'post' ) ) ) )
      		return false;
      
      	$is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
      
      	// If blog is public allow activity to be posted
      	if ( $is_blog_public ) {
      
      		// Get activity related links
      		$post_permalink = get_permalink( $recorded_comment->comment_post_ID );
      		$comment_link   = htmlspecialchars( get_comment_link( $recorded_comment->comment_ID ) );
      
      		// Prepare to record in activity streams
      		if ( is_multisite() )
      

Comments are closed.