LLMS_Template_Loader::restricted_by_lesson_drip( array $info )

Handle redirects and messages when a user attempts to access a lesson for that is restricted by lesson drip settings.


Description Description

Redirect to parent course and display message.


Top ↑

Parameters Parameters

$info

(array) (Required) Array of restriction info from llms_page_restricted().


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.template.loader.php

	 * @return void
	 */
	public function restricted_by_lesson_drip( $info ) {

		$lesson = new LLMS_Lesson( $info['restriction_id'] );

		$msg      = llms_get_restriction_message( $info );
		$redirect = get_permalink( $lesson->get( 'parent_course' ) );

		$this->handle_restriction(
			apply_filters( 'llms_restricted_by_lesson_drip_message', $msg, $info ),
			apply_filters( 'llms_restricted_by_lesson_drip_redirect', $redirect, $info ),
			'error'
		);


Top ↑

Changelog Changelog

Changelog
Version Description
5.7.0 Replaced the call to the deprecated LLMS_Lesson::get_parent_course() method with LLMS_Lesson::get( 'parent_course' ).
3.2.4 Moved message generation to llms_get_restriction_message()
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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