<?php

if ( ! defined( 'WPINC' ) ) {
	die();
}

if ( ! class_exists( 'TMT_Sticky' ) ) {

	class TMT_Sticky {

		private static $instance = null;

		public $assets;

		public function __construct() {
			add_action( 'init', array( $this, 'init' ), -999 );
		}

		public function init() {

			$this->load_files();

			tmt_sticky_element_extension()->init();
			
			do_action( 'tmt-sticky/init', $this );

		}

		public function load_files() {
			require wp_directory .'/inc/sticky/element-extension.php';
		}
		
		public static function get_instance() {
			if ( null == self::$instance ) {
				self::$instance = new self;
			}
			return self::$instance;
		}
	}
}

TMT_Sticky::get_instance();