PluginProbe ʕ •ᴥ•ʔ
Timeline Blocks / 2.0.0
Timeline Blocks v2.0.0
2.0.1 2.0.0 trunk
timeline-blocks / src / tb-helper / class-tb-loader.php
timeline-blocks / src / tb-helper Last commit date
class-tb-admin.php 1 week ago class-tb-block-helper.php 1 week ago class-tb-config.php 1 week ago class-tb-core-plugin.php 1 week ago class-tb-helper.php 1 week ago class-tb-init-blocks.php 1 week ago class-tb-loader.php 1 week ago
class-tb-loader.php
65 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 /**
7 * TB Loader.
8 *
9 * @package TB
10 */
11 if (!class_exists('TB_Loader')) {
12
13 /**
14 * Class TB_Loader.
15 */
16 final class TB_Loader {
17
18 /**
19 * Member Variable
20 *
21 * @var instance
22 */
23 private static $instance;
24
25 /**
26 * Initiator
27 */
28 public static function get_instance() {
29 if (!isset(self::$instance)) {
30 self::$instance = new self;
31 }
32 return self::$instance;
33 }
34
35 /**
36 * Constructor
37 */
38 public function __construct() {
39
40 $this->loader();
41
42 add_action('plugins_loaded', array($this, 'load_plugin'));
43 }
44
45 /**
46 * Loads Other files.
47 *
48 * @since 1.0.0
49 *
50 * @return void
51 */
52 public function loader() {
53 require( TB_DIR . 'src/tb-helper/class-tb-helper.php' );
54 require( TB_DIR . 'src/tb-helper/class-tb-core-plugin.php' );
55 }
56
57 }
58
59 /**
60 * Prepare if class 'TB_Loader' exist.
61 * Kicking this off by calling 'get_instance()' method
62 */
63 TB_Loader::get_instance();
64 }
65