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