BP_REST_Signup_Endpoint::get_item_schema()
Get the signup schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-members/classes/class-bp-rest-signup-endpoint.php
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => 'bp_signup',
'type' => 'object',
'properties' => array(
'id' => array(
'context' => array( 'view', 'edit' ),
'description' => __( 'A unique numeric ID for the signup.', 'buddyboss' ),
'readonly' => true,
'type' => 'integer',
),
'user_login' => array(
'context' => array( 'view', 'edit' ),
'description' => __( 'The username of the user the signup is for.', 'buddyboss' ),
'required' => true,
'type' => 'string',
'readonly' => true,
),
'user_name' => array(
'context' => array( 'view', 'edit' ),
'description' => __( 'The full name of the user the signup is for.', 'buddyboss' ),
'type' => 'string',
'readonly' => true,
'arg_options' => array(
'sanitize_callback' => 'sanitize_text_field',
),
),
'user_email' => array(
'context' => array( 'edit' ),
'description' => __( 'The email for the user the signup is for.', 'buddyboss' ),
'type' => 'string',
'readonly' => true,
),
'activation_key' => array(
'context' => array( 'edit' ),
'description' => __( 'Activation key of the signup.', 'buddyboss' ),
'type' => 'string',
'readonly' => true,
),
'registered' => array(
'context' => array( 'view', 'edit' ),
'description' => __( 'The registered date for the user, in the site\'s timezone.', 'buddyboss' ),
'type' => 'string',
'readonly' => true,
'format' => 'date-time',
),
),
);
/**
* Filters the signup schema.
*
* @param array $schema The endpoint schema.
*/
return apply_filters( 'bp_rest_signup_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.