LLMS_Lesson::get_previous_lesson()
Get previous lesson ID
Return Return
(false|int) WP_Post ID of the previous lesson or false
if one doesn't exist.
Source Source
File: includes/models/model.llms.lesson.php
public function get_previous_lesson() { return $this->get_sibling( 'prev' ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.4.2 | Use a numeric comparison for the previous position meta query. |
4.4.0 | Improve query so that unpublished siblings do not break expected results. Use strict comparisons where needed. Make sure to always return false if no previous lesson is found. |
4.10.2 | Refactor to use helper method get_sibling() . |
3.24.0 | Unknown. |
1.0.0 | Introduced. |