get_lesson( WP_Post|int|false $the_lesson = false, array $args = array() )

Get Product


Parameters Parameters

$the_lesson

(WP_Post|int|false) (Optional) Lesson post object or id. If false uses the global $post object.

Default value: false

$args

(array) (Optional) Arguments to pass to the LLMS_Lesson Constructor.

Default value: array()


Top ↑

Return Return

(LLMS_Product)


Top ↑

Source Source

File: includes/functions/llms.functions.course.php

function get_lesson( $the_lesson = false, $args = array() ) {

	if ( ! $the_lesson ) {
		global $post;
		$the_lesson = $post;
	}

	return new LLMS_Lesson( $the_lesson, $args );

}


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.13 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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