BP_XProfile_Group::populate( int $id )
Populate a profile field group.
Description
Parameters
- $id
-
(Required) Field group ID.
Return
(boolean)
Source
File: bp-xprofile/classes/class-bp-xprofile-group.php
public function populate( $id ) { // Get this group. $group = self::get( array( 'profile_group_id' => $id ) ); // Bail if group not found. if ( empty( $group ) ) { return false; } // Get the first array element. $group = reset( $group ); // Set object properties. $this->id = $group->id; $this->name = $group->name; $this->description = $group->description; $this->can_delete = $group->can_delete; $this->group_order = $group->group_order; }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
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.