BP_Blogs_Blog::is_recorded( int $blog_id )

Check whether a blog has been recorded by BuddyPress.

Description

Parameters

$blog_id

(Required) ID of the blog being queried.

Return

(int|null) The ID of the first located entry in the BP table on success, otherwise null.

Source

File: bp-blogs/classes/class-bp-blogs-blog.php

	public static function is_recorded( $blog_id ) {
		global $wpdb;

		$bp = buddypress();

		$query = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->blogs->table_name} WHERE blog_id = %d", $blog_id ) );

		return is_numeric( $query ) ? (int) $query : $query;
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.