BP_REST_Mention_Endpoint::get_item_schema()
Get the settings schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-core/classes/class-bp-rest-mention-endpoint.php
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'bp_mention', 'type' => 'object', 'properties' => array( 'id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'A unique numeric ID for the Member.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'display_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Member\'s mention name.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'user_nicename' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Member\'s nicename.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'name' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Member\'s display name.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'image' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Member\'s avatar image.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), ), ); /** * Filters the mention schema. * * @param string $schema The endpoint schema. */ return apply_filters( 'bp_rest_mention_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.