LLMS_Template_Loader::restricted_by_course_track_prerequisite( array $info )

Handle redirects and messages when a user attempts to access an item restricted by a course track prerequisite.

Description Description

Redirect to parent course and display message. If course do nothing.

Top ↑

Parameters Parameters


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

Top ↑

Return Return


Top ↑

Source Source

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

	 * @return void
	public function restricted_by_course_track_prerequisite( $info ) {

		if ( 'course' === get_post_type( $info['content_id'] ) ) {

		$msg      = llms_get_restriction_message( $info );
		$course   = llms_get_post_parent_course( $info['content_id'] );
		$redirect = get_permalink( $course->get( 'id' ) );
			apply_filters( 'llms_restricted_by_course_track_prerequisite_message', $msg, $info ),
			apply_filters( 'llms_restricted_by_course_track_prerequisite_redirect', $redirect, $info ),

Top ↑

Changelog Changelog

Version Description
3.7.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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