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.
Return Return
(WP_Post[])
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.
Expand full source code Collapse full source code View on GitHub
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. |