BP_REST_Account_Settings_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-endpoint.php
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'bp_account_settings',
'type' => 'object',
'properties' => array(
'name' => array(
'context' => array( 'embed', 'view', 'edit' ),
'description' => __( 'A unique name for the setting navigation.', 'buddyboss' ),
'readonly' => true,
'type' => 'string',
),
'slug' => array(
'context' => array( 'embed', 'view', 'edit' ),
'description' => __( 'The URL-friendly name for the navigation', 'buddyboss' ),
'readonly' => true,
'type' => 'string',
),
'position' => array(
'context' => array( 'embed', 'view', 'edit' ),
'description' => __( 'The position of the current navigation item.', 'buddyboss' ),
'readonly' => true,
'type' => 'integer',
),
'link' => array(
'context' => array( 'embed', 'view', 'edit' ),
'description' => __( 'A unique link for the navigation.', 'buddyboss' ),
'readonly' => true,
'type' => 'string',
),
),
);
/**
* Filters the Account Settings schema.
*
* @param array $schema The endpoint schema.
*/
return apply_filters( 'bp_rest_account_settings_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.