tabs.php in Getwid – Gutenberg Blocks 3.0.2, at includes/blocks/tabs.php
| 1 | <?php |
| 2 | |
| 3 | namespace Getwid\Blocks; |
| 4 | |
| 5 | class Tabs extends AbstractBlock { |
| 6 | |
| 7 | public function __construct() { |
| 8 | |
| 9 | parent::__construct( 'getwid/tabs' ); |
| 10 | |
| 11 | register_block_type( |
| 12 | getwid_get_plugin_path( 'assets/blocks/tabs/tabs' ) |
| 13 | ); |
| 14 | |
| 15 | register_block_type( |
| 16 | getwid_get_plugin_path( 'assets/blocks/tabs/tabs-item' ) |
| 17 | ); |
| 18 | } |
| 19 | |
| 20 | public function get_label() { |
| 21 | return __( 'Tabs', 'getwid' ); |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | getwid()->blocksManager()->addBlock( |
| 26 | new Tabs() |
| 27 | ); |
| 28 |