bp_is_new_blog_public

  • apply_filters( 'bp_is_new_blog_public', !$is_private )

    Source Reference:

    • Component: BuddyPress :: bp-blogs
      File: /bp-blogs/bp-blogs-functions.php :: Trac Source Line: 108
      	$recorded_blog_id = $recorded_blog->save();
      
      	$is_recorded = !empty( $recorded_blog_id ) ? true : false;
      
      	bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'name', $name );
      	bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description );
      	bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', bp_core_current_time() );
      
      	$is_private = !empty( $_POST['blog_public'] ) && (int)$_POST['blog_public'] ? false : true;
      	$is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private );
      
      	// Only record this activity if the blog is public
      	if ( !$is_private && !$no_activity ) {
      		// Record this in activity streams
      		bp_blogs_record_activity( array(
      			'user_id'      => $recorded_blog->user_id,
      			'action'       => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the site %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_site_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), $recorded_blog, $name, $description ),
      			'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_site_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
      			'type'         => 'new_blog',
      			'item_id'      => $recorded_blog->blog_id
      

Comments are closed.