LLMS_Lesson::get_sibling( string $direction )
Retrieve the sibling lesson in a specified direction
Parameters Parameters
- $direction
-
(string) (Required) Direction of navigation. Accepts either "prev" or "next".
Return Return
(false|int) WP_Post ID of the sibling lesson or false if one doesn't exist.
Source Source
File: includes/models/model.llms.lesson.php
protected function get_sibling( $direction ) {
$lesson = $this->get_sibling_lesson_query( $direction );
// No lesson found within the section, look within the sibling section.
if ( ! $lesson ) {
$lesson = $this->get_sibling_section_query( $direction );
}
return $lesson;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.10.2 | Introduced. |