BlockController
3 years ago
BlockBase.php
3 years ago
GridHoverLayout.php
3 years ago
GridLayout.php
3 years ago
ListLayout.php
3 years ago
RttpgRow.php
3 years ago
RttpgRow.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace RT\ThePostGrid\Controllers\Blocks; |
| 4 | |
| 5 | class RttpgRow { |
| 6 | |
| 7 | private $block_type; |
| 8 | |
| 9 | public function __construct() { |
| 10 | add_action( 'init', [ $this, 'register_blocks' ] ); |
| 11 | $this->block_type = 'rttpg/row'; |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Register Block |
| 16 | * @return void |
| 17 | */ |
| 18 | public function register_blocks() { |
| 19 | if ( ! function_exists( 'register_block_type' ) ) { |
| 20 | return; |
| 21 | } |
| 22 | register_block_type( |
| 23 | $this->block_type, |
| 24 | [ |
| 25 | // 'attributes' => $this->get_attributes(), |
| 26 | 'render_callback' => [ $this, 'render_block' ], |
| 27 | ] |
| 28 | ); |
| 29 | } |
| 30 | |
| 31 | public function render_block( $settings, $content ) { |
| 32 | |
| 33 | return $content; |
| 34 | } |
| 35 | } |
| 36 |