Tribe__Events__REST__V1__Endpoints__Archive_Category::READ_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/Archive_Category.php
public function READ_args() {
return array(
'page' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_positive_int' ),
'default' => 1,
'description' => __( 'The archive page to return', 'the-events-calendar' ),
'type' => 'integer',
),
'per_page' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_positive_int' ),
'sanitize_callback' => array( $this, 'sanitize_per_page' ),
'default' => $this->get_default_posts_per_page(),
'description' => __( 'The number of event categories to return on each page', 'the-events-calendar' ),
'type' => 'integer',
),
'search' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'description' => __( 'Limit results to those matching a string', 'the-events-calendar' ),
'type' => 'string',
),
'exclude' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_category' ),
'description' => __( 'Ensure result set exclude specific IDs', 'the-events-calendar' ),
'swagger_type' => 'array',
'items' => array( 'type' => 'integer' ),
),
'include' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_category' ),
'description' => __( 'Limit result set to specific IDs', 'the-events-calendar' ),
'swagger_type' => 'array',
'items' => array( 'type' => 'integer' ),
),
'order' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'description' => __( 'Order sort attribute ascending or descending', 'the-events-calendar' ),
'type' => 'string',
),
'orderby' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'description' => __( 'Sort collection by term attribute', 'the-events-calendar' ),
'type' => 'string',
),
'hide_empty' => array(
'required' => false,
'description' => __( 'Whether to hide terms not assigned to any posts', 'the-events-calendar' ),
'type' => 'boolean',
'default' => '1',
),
'parent' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_category' ),
'description' => __( 'Limit result set to terms assigned to a specific parent', 'the-events-calendar' ),
'type' => 'integer',
),
'post' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_id' ),
'description' => __( 'Limit result set to terms assigned to a specific post', 'the-events-calendar' ),
'type' => 'integer',
),
'event' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_event_id' ),
'description' => __( 'Limit result set to terms assigned to a specific event (an alias of the "post" parameter)',
'the-events-calendar' ),
'type' => 'integer',
),
'slug' => array(
'required' => false,
'validate_callback' => array( $this->validator, 'is_string' ),
'description' => __( 'Limit result set to terms with a specific slug', 'the-events-calendar' ),
'type' => 'string',
),
);
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |