| 1 |
<?php |
| 2 |
|
| 3 |
namespace Getwid\Blocks; |
| 4 |
|
| 5 |
class ImageBox extends AbstractBlock { |
| 6 |
|
| 7 |
public function __construct() { |
| 8 |
|
| 9 |
parent::__construct( 'getwid/image-box' ); |
| 10 |
|
| 11 |
register_block_type( |
| 12 |
getwid_get_plugin_path( 'assets/blocks/image-box' ) |
| 13 |
); |
| 14 |
} |
| 15 |
|
| 16 |
public function get_label() { |
| 17 |
return __( 'Image Box', 'getwid' ); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
getwid()->blocksManager()->addBlock( |
| 23 |
new ImageBox() |
| 24 |
); |
| 25 |
|