init.php
57 lines
| 1 | <?php |
| 2 | namespace ElementsKit_Lite\Compatibility\Conflicts; |
| 3 | |
| 4 | defined( 'ABSPATH' ) || exit; |
| 5 | |
| 6 | |
| 7 | /** |
| 8 | * Init |
| 9 | * Initiate all necessary classes, hooks, configs. |
| 10 | * |
| 11 | * @since 1.2.6 |
| 12 | */ |
| 13 | class Init { |
| 14 | |
| 15 | /** |
| 16 | * Member Variable |
| 17 | * |
| 18 | * @var instance |
| 19 | */ |
| 20 | private static $instance; |
| 21 | |
| 22 | |
| 23 | /** |
| 24 | * Instance. |
| 25 | * |
| 26 | * Ensures only one instance of the plugin class is loaded or can be loaded. |
| 27 | * |
| 28 | * @since 1.2.6 |
| 29 | * @access public |
| 30 | * @static |
| 31 | * |
| 32 | * @return Init An instance of the class. |
| 33 | */ |
| 34 | public static function instance() { |
| 35 | if ( is_null( self::$instance ) ) { |
| 36 | |
| 37 | // Fire when ElementsKit_Lite instance. |
| 38 | self::$instance = new self(); |
| 39 | } |
| 40 | |
| 41 | return self::$instance; |
| 42 | } |
| 43 | |
| 44 | |
| 45 | /** |
| 46 | * Construct the plugin object. |
| 47 | * |
| 48 | * @since 1.2.6 |
| 49 | * @access public |
| 50 | */ |
| 51 | public function __construct() { |
| 52 | Scripts::instance(); |
| 53 | } |
| 54 | |
| 55 | |
| 56 | } |
| 57 |