Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Analytics_Lessoncompletions_Widget::get_lesson_ids( array $products )
Retrieve an array of lesson ids for all the products in the current filter
Description Description
Parameters Parameters
- $products
-
(array) (Required) array of product ids
Return Return
(array)
Source Source
File: includes/admin/reporting/widgets/class.llms.analytics.widget.lessoncompletions.php
private function get_lesson_ids( $products ) { $lessons = array(); // loop through all products foreach ( $products as $product ) { // ignore the memberships if ( 'llms_membership' === get_post_type( $product ) ) { continue; } // get the course $course = llms_get_post( $product ); $lessons = array_merge( $course->get_lessons( 'ids' ) ); } return $lessons; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: