| 1 |
<?php |
| 2 |
|
| 3 |
namespace Jet_Form_Builder\Blocks\Render; |
| 4 |
|
| 5 |
// If this file is called directly, abort. |
| 6 |
if ( ! defined( 'WPINC' ) ) { |
| 7 |
die; |
| 8 |
} |
| 9 |
|
| 10 |
/** |
| 11 |
* Define text field renderer class |
| 12 |
*/ |
| 13 |
class Conditional_Block_Render extends Base { |
| 14 |
|
| 15 |
public function get_name() { |
| 16 |
return 'conditional-block'; |
| 17 |
} |
| 18 |
|
| 19 |
public function render( $wp_block = null, $template = null ) { |
| 20 |
return sprintf( '<div class="jet-form-builder__conditional" data-conditional="%2$s">%1$s</div>', |
| 21 |
$this->block_type->block_content, |
| 22 |
$this->block_type->get_conditions() |
| 23 |
); |
| 24 |
} |
| 25 |
} |
| 26 |
|