get_course( WP_Post|int|false $the_course = false, array $args = array() )

Get course object


Description Description


Parameters Parameters

$the_course

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

Default value: false

$args

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

Default value: array()


Top ↑

Return Return

(array)


Top ↑

Source Source

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

function get_course( $the_course = false, $args = array() ) {

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

	return new LLMS_Course( $the_course, $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.