LLMS_Lesson::get_course()
Retrieve an instance of LLMS_Course for the element’s parent course
Return Return
(LLMS_Course|null) Returns null
if the lesson is not attached to any courses.
Source Source
File: includes/models/model.llms.lesson.php
public function get_course() { $course_id = $this->get( 'parent_course' ); if ( ! $course_id ) { return null; } return llms_get_post( $course_id ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |