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
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | public function get_item_schema() { $schema = array ( '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.