BP_Blogs_Blog::is_recorded( int $blog_id )

Check whether a blog has been recorded by BuddyPress.

Parameters Parameters


(int) (Required) ID of the blog being queried.

Top ↑

Return Return

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

Source 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;

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.