| 1 |
<?php |
| 2 |
|
| 3 |
namespace Getwid\Blocks\TemplateParts; |
| 4 |
|
| 5 |
class TemplatePostLayoutHelper extends \Getwid\Blocks\AbstractBlock { |
| 6 |
|
| 7 |
public function __construct() { |
| 8 |
|
| 9 |
parent::__construct( 'getwid/template-post-layout-helper' ); |
| 10 |
|
| 11 |
register_block_type( |
| 12 |
getwid_get_plugin_path( 'assets/blocks/template-parts/post-layout-helper' ) |
| 13 |
); |
| 14 |
} |
| 15 |
|
| 16 |
public function get_label() { |
| 17 |
return __( 'Layout', 'getwid' ); |
| 18 |
} |
| 19 |
|
| 20 |
public function can_be_disabled() { |
| 21 |
return false; |
| 22 |
} |
| 23 |
|
| 24 |
public function is_disabled() { |
| 25 |
return apply_filters( 'getwid/blocks/is_disabled', false, 'getwid/template-post-layout-helper' ); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
getwid()->blocksManager()->addBlock( |
| 30 |
new TemplatePostLayoutHelper() |
| 31 |
); |
| 32 |
|