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.


Top ↑

Source Source

File: includes/models/model.llms.lesson.php

	public function get_previous_lesson() {

		return $this->get_sibling( 'prev' );

	}


Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.