Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LifterLMS::__construct()

LifterLMS Constructor.


Description Description


Return Return

(LifterLMS)


Top ↑

Source Source

File: lifterlms.php

	private function __construct() {

		if ( function_exists( '__autoload' ) ) {
			spl_autoload_register( '__autoload' );
		}

		spl_autoload_register( array( $this, 'autoload' ) );

		// Define constants
		$this->define_constants();

		// localize as early as possible
		// since 4.6 the "just_in_time" l10n will load the default (not custom) file first
		// so we must localize before any l10n functions (like `__()`) are used
		// so that our custom "safe" location will always load first
		$this->localize();

		//Include required files
		$this->includes();

		// setup session stuff
		$this->session = new LLMS_Session();

		// Hooks
		register_activation_hook( __FILE__, array( 'LLMS_Install', 'install' ) );
		add_action( 'init', array( $this, 'init' ), 0 );
		add_action( 'init', array( $this, 'integrations' ), 1 );
		add_action( 'init', array( $this, 'processors' ), 5 );
		add_action( 'init', array( $this, 'include_template_functions' ) );
		add_action( 'init', array( 'LLMS_Shortcodes', 'init' ) );
		add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_action_links' ), 10, 1 );

		// tracking
		if ( defined( 'DOING_CRON' ) && DOING_CRON && 'yes' === get_option( 'llms_allow_tracking', 'no' ) ) {
			LLMS_Tracker::init();
		}

		// Loaded action
		do_action( 'lifterlms_loaded' );

	}

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.





Permalink: