anchor.php in Getwid – Gutenberg Blocks 2.1.0, at includes/blocks/anchor.php
| 1 | <?php |
| 2 | |
| 3 | namespace Getwid\Blocks; |
| 4 | |
| 5 | class Anchor extends \Getwid\Blocks\AbstractBlock { |
| 6 | |
| 7 | protected static $blockName = 'getwid/anchor'; |
| 8 | |
| 9 | public function __construct() { |
| 10 | |
| 11 | parent::__construct( self::$blockName ); |
| 12 | |
| 13 | register_block_type( |
| 14 | 'getwid/anchor' |
| 15 | ); |
| 16 | |
| 17 | } |
| 18 | |
| 19 | public function getLabel() { |
| 20 | return __('Anchor', 'getwid'); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | getwid()->blocksManager()->addBlock( |
| 25 | new \Getwid\Blocks\Anchor() |
| 26 | ); |
| 27 |