BP_REST_Groups_Details_Endpoint::get_item_schema()

Get the group details schema, conforming to JSON Schema.

Description

Return

(array)

Source

File: bp-groups/classes/class-bp-rest-groups-details-endpoint.php

432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
public function get_item_schema() {
    $schema = array(
        '$schema'    => 'http://json-schema.org/draft-04/schema#',
        'title'      => 'bp_groups_details',
        'type'       => 'object',
        'properties' => array(
            'tabs'          => array(
                'context'     => array( 'embed', 'view' ),
                'description' => __( 'Groups directory tabs.', 'buddyboss' ),
                'type'        => 'object',
                'readonly'    => true,
                'items'       => array(
                    'type' => 'array',
                ),
            ),
            'order_options' => array(
                'context'     => array( 'embed', 'view' ),
                'description' => __( 'Groups order by options.', 'buddyboss' ),
                'type'        => 'array',
                'readonly'    => true,
            ),
        ),
    );
 
    /**
     * Filters the group details schema.
     *
     * @param array $schema The endpoint schema.
     */
    return apply_filters( 'bp_rest_group_schema', $this->add_additional_fields_schema( $schema ) );
}

Changelog

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