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
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | public function get_item_schema() { $schema = array ( '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.