BP_REST_Account_Settings_Options_Endpoint::get_item_schema()
Get the Account Settings schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'bp_account_settings_options', 'type' => 'object', 'properties' => array( 'name' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'A unique name for the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'label' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Label of the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'type' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The type the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'value' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The saved value for the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'options' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Available options for the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'object', ), 'headline' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Headline text for the field.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), ), ); /** * Filters the Account Settings schema. * * @param array $schema The endpoint schema. */ return apply_filters( 'bp_rest_account_settings_options_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.