LLMS_REST_Controller::prepare_collection_items_for_response( array $objects, WP_REST_Request $request )

Prepare collection items for response.

Parameters Parameters


(array) (Required) Array of objects to be prepared for response.


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

Top ↑

Return Return


Top ↑

Source Source

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


		return $prepared;

	 * Prepare query args for total count query.
	 * @since 1.0.0-beta.7
	 * @param  array           $args    Array of query args.
	 * @param  WP_REST_Request $request Full details about the request.
	 * @return array
	protected function prepare_args_for_total_count_query( $args, $request ) {
		// Run the query again without pagination to get a proper total count.
		unset( $args['paged'], $args['page'] );
		return $args;

Top ↑

Changelog Changelog

Version Description
1.0.0-beta.7 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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