LLMS_Lesson::get_sibling_lesson_query( string $direction )
Performs a query to retrieve a sibling lesson in the specified direction
Description Description
This method tries to locate a sibling lesson in the next or previous position.
It does not account for lessons in a sibling section. For example, if the lesson is the last lesson in a section this function will not locate the first lesson in the course’s next section. For this reason this function should not be relied upon alone.
Parameters Parameters
- $direction
-
(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
Changelog Changelog
Version | Description |
---|---|
4.10.2 | Introduced. |