BP_Blogs_Blog::populate()

Populate the object with data about the specific activity item.

Description

Source

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

	public function populate() {
		global $wpdb;

		$bp = buddypress();

		$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->blogs->table_name} WHERE id = %d", $this->id ) );

		$this->user_id = (int) $blog->user_id;
		$this->blog_id = (int) $blog->blog_id;
	}

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.