| 1 |
<?php |
| 2 |
/** |
| 3 |
* Core component |
| 4 |
* |
| 5 |
* @package BoldBlocks |
| 6 |
* @author Phi Phan <mrphipv@gmail.com> |
| 7 |
* @copyright Copyright (c) 2022, Phi Phan |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace BoldBlocks; |
| 11 |
|
| 12 |
// Exit if accessed directly. |
| 13 |
defined( 'ABSPATH' ) || exit; |
| 14 |
|
| 15 |
if ( ! class_exists( CoreComponent::class ) ) : |
| 16 |
/** |
| 17 |
* Create/edit custom content blocks. |
| 18 |
*/ |
| 19 |
abstract class CoreComponent { |
| 20 |
/** |
| 21 |
* The plugin instance |
| 22 |
* |
| 23 |
* @var ContentBlocksBuilder |
| 24 |
*/ |
| 25 |
protected $the_plugin_instance; |
| 26 |
|
| 27 |
/** |
| 28 |
* A constructor |
| 29 |
*/ |
| 30 |
public function __construct( $the_plugin_instance ) { |
| 31 |
$this->the_plugin_instance = $the_plugin_instance; |
| 32 |
} |
| 33 |
|
| 34 |
/** |
| 35 |
* Run main hooks |
| 36 |
* |
| 37 |
* @return void |
| 38 |
*/ |
| 39 |
abstract public function run(); |
| 40 |
} |
| 41 |
endif; |
| 42 |
|