BP_REST_Media_Details_Endpoint::get_item_schema()
Get the media details schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-media/classes/class-bp-rest-media-details-endpoint.php
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'bp_media_details',
'type' => 'object',
'properties' => array(
'tabs' => array(
'context' => array( 'embed', 'view' ),
'description' => __( 'Media directory tabs.', 'buddyboss' ),
'type' => 'object',
'readonly' => true,
'items' => array(
'type' => 'array',
),
),
'privacy' => array(
'context' => array( 'embed', 'view' ),
'description' => __( 'Media privacy.', 'buddyboss' ),
'type' => 'object',
'readonly' => true,
),
),
);
/**
* Filters the media details schema.
*
* @param array $schema The endpoint schema.
*/
return apply_filters( 'bp_rest_media_details_schema', $this->add_additional_fields_schema( $schema ) );
}
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.