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