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
if ( 'edit' === $request['context'] ) {
add_filter( 'post_password_required', '__return_false' );
}
if ( ! $this->check_read_permission( $object ) ) {
return llms_rest_authorization_required_error();
}
return true;
}
/**
* Retrieves the query params for the objects collection
*
* @since 1.0.0-beta.19
*
* @return array Collection parameters.
*/
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',
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.19 | Introduced. |