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.


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

		$this->define_constants();

		$this->init_assets();

		$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, 'payment_gateways' ) );
		add_action( 'init', array( $this, 'include_template_functions' ) );

		add_action( 'admin_init', array( 'LLMS_Site', 'check_status' ) );

		// 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
6.4.0 Moved registration of LLMS_Shortcodes::init() with the 'init' hook to LLMS_Shortcodes::__construct().
6.1.0 Automatically load payment gateways.
5.3.0 Move the loading of the LifterLMS autoloader to the main lifterlms.php file.
4.13.0 Check site duplicate status on admin_init.
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.