LLMS_REST_Sections_Controller::get_content_items( WP_REST_Request $request )
Get a collection of content items (lessons).
Parameters Parameters
- $request
-
(WP_REST_Request) (Required) Full details about the request.
Return Return
(WP_Error|WP_REST_Response)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-sections-controller.php
* * @param WP_REST_Request $request Full details about the request. * @return WP_Error|WP_REST_Response */ public function get_content_items( $request ) { $this->content_controller->set_parent_id( $request['id'] ); $result = $this->content_controller->get_items( $request ); // Specs require 404 when no section's lessons are found. if ( ! is_wp_error( $result ) && empty( $result->data ) ) { return llms_rest_not_found_error(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |