LLMS_REST_Posts_Controller::prepare_collection_query_args( WP_REST_Request $request )

Format query arguments to retrieve a collection of objects.

Parameters Parameters


(WP_REST_Request) (Required) Full details about the request.

Top ↑

Return Return


Top ↑

Source Source

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

	protected function prepare_collection_query_args( $request ) {

		$prepared = parent::prepare_collection_query_args( $request );
		if ( is_wp_error( $prepared ) ) {
			return $prepared;

		// Force the post_type argument, since it's not a user input variable.
		$prepared['post_type'] = $this->post_type;

		$query_args = $this->prepare_items_query( $prepared, $request );

		return $query_args;


Top ↑

Changelog Changelog

Version Description
1.0.0-beta.18 Correctly return errors.
1.0.0-beta.12 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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