LLMS_Template_Loader::__construct()

Constructor


Description Description


Source Source

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

	public function __construct() {

		// do template loading
		add_filter( 'template_include', array( $this, 'template_loader' ) );

		// restriction actions for each kind of restriction
		$reasons = apply_filters( 'llms_restriction_reasons', array(
			'course_prerequisite',
			'course_track_prerequisite',
			'course_time_period',
			'enrollment_lesson',
			'lesson_drip',
			'lesson_prerequisite',
			'membership',
			'sitewide_membership',
			'quiz',
		) );

		foreach ( $reasons as $reason ) {
			add_action( 'llms_content_restricted_by_' . $reason, array( $this, 'restricted_by_' . $reason ), 10, 1 );
		}

		add_action( 'wp', array( $this, 'maybe_redirect_to_sales_page' ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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