AudioBlock.php
2 years ago
MediaHubBlock.php
2 years ago
ReusableEditBlock.php
3 years ago
ReusableVideoBlock.php
5 years ago
SelfHostedBlock.php
2 years ago
VimeoBlock.php
2 years ago
YouTubeBlock.php
2 years ago
VimeoBlock.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | namespace PrestoPlayer\Blocks; |
| 4 | |
| 5 | use PrestoPlayer\Support\Block; |
| 6 | |
| 7 | class VimeoBlock extends Block |
| 8 | { |
| 9 | /** |
| 10 | * Block name |
| 11 | * |
| 12 | * @var string |
| 13 | */ |
| 14 | protected $name = 'vimeo'; |
| 15 | |
| 16 | /** |
| 17 | * Translated block title |
| 18 | */ |
| 19 | protected $title; |
| 20 | |
| 21 | public function __construct(bool $isPremium = false, $version = 1) |
| 22 | { |
| 23 | parent::__construct($isPremium, $version); |
| 24 | $this->title = __('Vimeo', 'presto-player'); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Register the block type. |
| 29 | * |
| 30 | * @return void |
| 31 | */ |
| 32 | public function registerBlockType() |
| 33 | { |
| 34 | register_block_type( |
| 35 | PRESTO_PLAYER_PLUGIN_DIR . 'src/admin/blocks/blocks/vimeo', |
| 36 | array( |
| 37 | 'render_callback' => [$this, 'html'], |
| 38 | ) |
| 39 | ); |
| 40 | } |
| 41 | } |
| 42 |