assets
1 year ago
interfaces
1 year ago
block-asset.php
1 year ago
block-attributes.php
1 year ago
block-render.php
1 year ago
block-template.php
1 year ago
block.json
1 year ago
block-template.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var $attributes Attributes_Interface The block attributes |
| 4 | */ |
| 5 | |
| 6 | use JFB_Compatibility\Jet_Engine\Blocks\Check_Mark\Interfaces\Attributes_Interface; |
| 7 | |
| 8 | /** |
| 9 | * @var \JFB_Compatibility\Jet_Engine\Jet_Engine $module |
| 10 | * @noinspection PhpUnhandledExceptionInspection |
| 11 | */ |
| 12 | $module = jet_form_builder()->compat( \JFB_Compatibility\Jet_Engine\Jet_Engine::class ); |
| 13 | |
| 14 | wp_enqueue_script( $module->get_handle( 'check-mark-' . $module->get_option_type() ) ); |
| 15 | |
| 16 | // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped |
| 17 | ?> |
| 18 | <div <?php echo $attributes->get_wrapper_attributes(); ?>> |
| 19 | <?php if ( $attributes->is_image_control() ) : ?> |
| 20 | <img |
| 21 | src="<?php echo esc_url( $attributes->get_default_icon_url() ); ?>" |
| 22 | class="jet-form-builder-check-mark-img" |
| 23 | /> |
| 24 | <img |
| 25 | src="<?php echo esc_url( $attributes->get_checked_icon_url() ); ?>" |
| 26 | class="jet-form-builder-check-mark-img checked" |
| 27 | /> |
| 28 | <?php else : ?> |
| 29 | <input |
| 30 | type="<?php echo esc_attr( $module->get_option_type() ); ?>" |
| 31 | class="check-mark-control" |
| 32 | > |
| 33 | <span></span> |
| 34 | <?php endif; ?> |
| 35 | </div> |
| 36 |