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

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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

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.