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