Tribe__Events__REST__V1__Endpoints__Single_Category::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_Category.php
public function CREATE_args() {
return array(
'name' => array(
'required' => true,
'validate_callback' => array( $this->validator, 'is_string' ),
'type' => 'string',
'description' => __( 'The event category name', 'the-events-calendar' ),
),
'description' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'type' => 'string',
'description' => __( 'The event category description', 'the-events-calendar' ),
),
'slug' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'type' => 'string',
'description' => __( 'The event category slug', 'the-events-calendar' ),
),
'parent' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_category' ),
'type' => 'integer',
'description' => __( 'The event category slug', 'the-events-calendar' ),
),
);
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |