| 1 |
<?php |
| 2 |
class Blocksspare_Block_Library { |
| 3 |
|
| 4 |
|
| 5 |
public static function instance() { |
| 6 |
|
| 7 |
static $instance = null; |
| 8 |
if ( null === $instance ) { |
| 9 |
$instance = new self(); |
| 10 |
|
| 11 |
if ( !defined( 'BLOCKSPARE_BLOCK_LIBRARY_PATH' ) ) { |
| 12 |
define( 'BLOCKSPARE_BLOCK_LIBRARY_PATH', BLOCKSPARE_PLUGIN_DIR . 'inc/template-library/blocks/' ); |
| 13 |
define( 'BLOCKSPARE_BLOCK_LIBRARY_URL', BLOCKSPARE_PLUGIN_URL . 'inc/template-library/blocks/' ); |
| 14 |
} |
| 15 |
} |
| 16 |
return $instance; |
| 17 |
} |
| 18 |
|
| 19 |
|
| 20 |
public function run() { |
| 21 |
$this->load_dependencies(); |
| 22 |
} |
| 23 |
|
| 24 |
private function load_dependencies() { |
| 25 |
|
| 26 |
|
| 27 |
/*Block Library*/ |
| 28 |
|
| 29 |
require_once BLOCKSPARE_BLOCK_LIBRARY_PATH .'pages/class-pages.php'; |
| 30 |
require_once BLOCKSPARE_BLOCK_LIBRARY_PATH .'sections/class-sections.php'; |
| 31 |
require_once BLOCKSPARE_BLOCK_LIBRARY_PATH .'footer/class-footer.php'; |
| 32 |
require_once BLOCKSPARE_BLOCK_LIBRARY_PATH .'header/class-header.php'; |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
Blocksspare_Block_Library::instance()->run(); |