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