assets
1 year ago
backend
1 year ago
build
1 year ago
vendor
1 year ago
tutor-droip-elements.php
1 year ago
tutor-droip-elements.php
51 lines
| 1 | <?php |
| 2 | use TutorLMSDroip\Backend; |
| 3 | use TutorLMSDroip\Frontend; |
| 4 | use TutorLMSDroip\Helper; |
| 5 | |
| 6 | if (!defined('ABSPATH')) { |
| 7 | exit; // Exit if accessed directly. |
| 8 | } |
| 9 | |
| 10 | require_once __DIR__ . '/vendor/autoload.php'; |
| 11 | |
| 12 | |
| 13 | /** |
| 14 | * Droip element source and filter hook will use using this prefix. |
| 15 | * this prefix value is same as javascript APP_PREFIX variable. |
| 16 | */ |
| 17 | define('TDE_APP_PREFIX', 'tde'); |
| 18 | define('TDE_BASE', home_url()); |
| 19 | define('TDE_PLUGIN_ROOT_BASE', plugin_dir_url(__FILE__)); |
| 20 | define('TDE_ROOT_PATH', plugin_dir_path( __FILE__ ) ); |
| 21 | |
| 22 | /** |
| 23 | * Tutor Droip Elements |
| 24 | * |
| 25 | * @package tutor-droip-elements |
| 26 | */ |
| 27 | class TutorDroipElements |
| 28 | { |
| 29 | /** |
| 30 | * Initializes a singleton instance |
| 31 | * |
| 32 | * @return \Droip |
| 33 | */ |
| 34 | public static function init() |
| 35 | { |
| 36 | static $instance = false; |
| 37 | |
| 38 | if (!$instance) { |
| 39 | $instance = new self(); |
| 40 | } |
| 41 | |
| 42 | register_activation_hook(__FILE__, array(new Helper(), 't_d_e_activate')); |
| 43 | |
| 44 | new Backend(); |
| 45 | new Frontend(); |
| 46 | |
| 47 | return $instance; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | TutorDroipElements::init(); |