| 1 |
<?php |
| 2 |
|
| 3 |
namespace MasterAddons\Inc\Admin\Templates\Kits; |
| 4 |
|
| 5 |
defined('ABSPATH') || exit; |
| 6 |
|
| 7 |
/** |
| 8 |
* Kits Loader - Initializes all Template Kits functionality |
| 9 |
*/ |
| 10 |
class Kits_Loader |
| 11 |
{ |
| 12 |
private static $_instance = null; |
| 13 |
|
| 14 |
public function __construct() |
| 15 |
{ |
| 16 |
$this->load_dependencies(); |
| 17 |
$this->init_classes(); |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* Load procedural files that haven't been converted to classes yet |
| 22 |
*/ |
| 23 |
private function load_dependencies() |
| 24 |
{ |
| 25 |
// All files are now class-based and loaded via autoloader |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* Initialize class-based components |
| 30 |
*/ |
| 31 |
private function init_classes() |
| 32 |
{ |
| 33 |
// Initialize Template Kits menu and page |
| 34 |
Template_Kits::get_instance(); |
| 35 |
|
| 36 |
// Initialize AJAX handlers |
| 37 |
Ajax_Handlers::get_instance(); |
| 38 |
|
| 39 |
// Initialize Importer |
| 40 |
Importer::get_instance(); |
| 41 |
} |
| 42 |
|
| 43 |
public static function get_instance() |
| 44 |
{ |
| 45 |
if (is_null(self::$_instance)) { |
| 46 |
self::$_instance = new self(); |
| 47 |
} |
| 48 |
return self::$_instance; |
| 49 |
} |
| 50 |
} |
| 51 |
|