BP_Groups_Component::rest_api_init( array $controllers = array() )

Init the BuddyBoss REST API.

Description

Parameters

$controllers

(Optional) See BP_Component::rest_api_init() for description.

Default value: array()

Source

File: bp-groups/classes/class-bp-groups-component.php

1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
public function rest_api_init( $controllers = array() ) {
    $controllers = array(
        'BP_REST_Groups_Endpoint',
        'BP_REST_Groups_Details_Endpoint',
        'BP_REST_Group_Membership_Endpoint',
        'BP_REST_Group_Settings_Endpoint',
        'BP_REST_Group_Invites_Endpoint',
        'BP_REST_Group_Membership_Request_Endpoint',
        'BP_REST_Groups_Types_Endpoint',
        'BP_REST_Attachments_Group_Avatar_Endpoint',
    );
 
    // Support to Group Cover.
    if ( bp_is_active( 'groups', 'cover_image' ) ) {
        $controllers[] = 'BP_REST_Attachments_Group_Cover_Endpoint';
    }
 
    parent::rest_api_init( $controllers );
}

Changelog

Changelog
Version Description
BuddyBoss 1.3.5 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.