PluginProbe
Getwid – Gutenberg Blocks / 3.0.2
Getwid – Gutenberg Blocks v3.0.2
3.0.2 3.0.1 3.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 trunk 1.8.7 1.9.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
getwid / includes / blocks / toggle.php

toggle.php in Getwid – Gutenberg Blocks 3.0.2, at includes/blocks/toggle.php

28 lines 458 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Getwid\Blocks;
4
5 class Toggle extends AbstractBlock {
6
7 public function __construct() {
8
9 parent::__construct( 'getwid/toggle' );
10
11 register_block_type(
12 getwid_get_plugin_path( 'assets/blocks/toggle/toggle' )
13 );
14
15 register_block_type(
16 getwid_get_plugin_path( 'assets/blocks/toggle/toggle-item' )
17 );
18 }
19
20 public function get_label() {
21 return __( 'Toggle', 'getwid' );
22 }
23 }
24
25 getwid()->blocksManager()->addBlock(
26 new Toggle()
27 );
28