Tribe__Events__REST__V1__Endpoints__Single_Organizer::CREATE_args()
Returns the content of the args array that should be used to register the endpoint with the register_rest_route function.
Return
(array)
Source
File: src/Tribe/REST/V1/Endpoints/Single_Organizer.php
public function CREATE_args() {
return array(
// Post fields
'author' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_user_id' ),
'type' => 'integer',
'default' => null,
'description' => __( 'The organizer author ID', 'the-events-calendar' ),
),
'date' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer publication date', 'the-events-calendar' ),
),
'date_utc' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_time' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer publication date (UTC time zone)', 'the-events-calendar' ),
),
'organizer' => array(
'required' => true,
'validate_callback' => array( $this->validator, 'is_string' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer name', 'the-events-calendar' ),
),
'description' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string_or_empty' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer description', 'the-events-calendar' ),
),
'status' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_post_status' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer post status', 'the-events-calendar' ),
),
// Organizer meta fields
'phone' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string_or_empty' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer phone number', 'the-events-calendar' ),
),
'website' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_url_or_empty' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer website', 'the-events-calendar' ),
),
'email' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string_or_empty' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer e-mail address', 'the-events-calendar' ),
),
'image' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_image_or_empty' ),
'type' => 'string',
'default' => null,
'description' => __( 'The organizer featured image ID or URL', 'the-events-calendar' ),
),
);
}
Changelog
| Version | Description |
|---|---|
| bucket/full-rest-api | Introduced. |