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

(void)


Top ↑

Source Source

File: class-lifterlms.php

	private function __construct() {

		/**
		 * 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();

		require_once LLMS_PLUGIN_DIR . 'includes/class-llms-loader.php';

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

		$this->query = new LLMS_Query();

		// Hooks.
		register_activation_hook( __FILE__, array( 'LLMS_Install', 'install' ) );
		add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_action_links' ), 10, 1 );

		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, 'events' ), 5 );
		add_action( 'init', array( $this, 'init_session' ), 6 ); // After table installation which happens at init 5.
		add_action( 'init', array( $this, 'include_template_functions' ) );
		add_action( 'init', array( 'LLMS_Shortcodes', 'init' ) );

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

		/**
		 * Action fired after LifterLMS is fully loaded.
		 *
		 * @since Unknown
		 */
		do_action( 'lifterlms_loaded' );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.0.0 Load $this->session at plugins_loaded in favor of during class construction. Remove deprecated __autoload() & initialize new file loader class.
3.21.1 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.