providers
5 months ago
complex-control.class.php
5 months ago
control-holder.class.php
5 months ago
control.class.php
5 months ago
custom-element.class.php
5 months ago
form-element.class.php
5 months ago
form-layout.class.php
5 months ago
form.class.php
5 months ago
holder.class.php
5 months ago
html-builder.class.php
5 months ago
index.php
5 months ago
custom-element.class.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The file contains the base class for all custom elements. |
| 4 | * |
| 5 | * @package factory-forms |
| 6 | * @since 1.0.0 |
| 7 | */ |
| 8 | |
| 9 | // Exit if accessed directly |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | if ( ! class_exists( 'Wbcr_FactoryForms600_CustomElement' ) ) { |
| 15 | /** |
| 16 | * The base class for all controls. |
| 17 | * |
| 18 | * @since 1.0.0 |
| 19 | */ |
| 20 | abstract class Wbcr_FactoryForms600_CustomElement extends Wbcr_FactoryForms600_FormElement { |
| 21 | |
| 22 | /** |
| 23 | * Is this element a custom form element? |
| 24 | * |
| 25 | * @since 1.0.0 |
| 26 | * @var bool |
| 27 | */ |
| 28 | public $is_custom = true; |
| 29 | |
| 30 | public function render() { |
| 31 | |
| 32 | // if the control is off, then ignore it |
| 33 | $off = $this->getOption( 'off', false ); |
| 34 | |
| 35 | if ( $off ) { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | $this->html(); |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 |