LLMS_REST_Posts_Controller::get_collection_params()
Retrieves the query params for the objects collection
Return Return
(array) Collection parameters.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
public function get_collection_params() {
$query_params = parent::get_collection_params();
$schema = $this->get_item_schema();
if ( isset( $schema['properties']['status'] ) ) {
$query_params['status'] = array(
'default' => 'publish',
'description' => __( 'Limit result set to posts assigned one or more statuses.', 'lifterlms' ),
'type' => 'array',
'items' => array(
'enum' => array_merge(
array_keys(
get_post_stati()
),
array(
'any',
)
),
'type' => 'string',
),
'sanitize_callback' => array( $this, 'sanitize_post_statuses' ),
);
}
return $query_params;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.19 | Introduced. |