LLMS_REST_Posts_Controller::get_collection_params()

Retrieves the query params for the objects collection


Return Return

(array) Collection parameters.


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php

370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
    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',


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.19 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.