get_course( WP_Post|int|false $the_course = false, array $args = array() )
Get course object
Parameters Parameters
- $the_course
-
(WP_Post|int|false) (Optional) Course post object or id. If
falseuses the global$postobject.Default value: false
- $args
-
(array) (Optional) Arguments to pass to the LLMS_Course Constructor.
Default value: array()
Return Return
(array)
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 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.37.13 | Introduced. |