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.


Top ↑

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 );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.