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
falseuses the global$postobject.Default value: false
- $args
-
(array) (Optional) Arguments to pass to the LLMS_Lesson Constructor.
Default value: array()
Return Return
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 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.37.13 | Introduced. |