LLMS_REST_Posts_Controller::get_objects_from_query( WP_Query $query )

Retrieve an array of objects from the result of $this->get_objects_query().


Parameters Parameters

$query

(WP_Query) (Required) WP_Query query result.


Top ↑

Return Return

(WP_Post[])


Top ↑

Source Source

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

	 * Retrieve a query object based on arguments from a `get_items()` (collection) request.
	 *
	 * @since 1.0.0-beta.7
	 *
	 * @param  array           $prepared Array of collection arguments.

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.9 Avoid performing an additional query, just return the already retrieved posts.
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.