File manager - Edit - /home/matthif/www/wp-content/plugins/gutenverse/includes/form_fallback/style/class-form-input-textarea.php
Back
<?php /** * Gutenverse Form_Input_Textarea * * @author Jegstudio * @since 1.0.0 * @package gutenverse-form\style */ namespace Gutenverse\Form_Fallback\Style; use Gutenverse\Framework\Style_Abstract; /** * Class Form_Input_Textarea * * @package gutenverse-form\style */ class Form_Input_Textarea extends Style_Abstract { /** * Block Directory * * @var string */ protected $block_dir = GUTENVERSE_DIR . 'includes/form_fallback/block/'; /** * Block Name * * @var array */ protected $name = 'form-input-textarea'; /** * Constructor * * @param array $attrs Attribute. */ public function __construct( $attrs ) { parent::__construct( $attrs ); $this->set_feature( array( 'background' => null, 'border' => null, 'positioning' => null, 'animation' => null, 'advance' => null, 'mask' => null, ) ); } /** * Generate style base on attribute. */ public function generate() { if ( isset( $this->attrs['labelWidth'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .label-wrapper", 'property' => function ( $value ) { return "width: {$value}%;"; }, 'value' => $this->attrs['labelWidth'], 'device_control' => true, ) ); } if ( isset( $this->attrs['labelColor'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .label-wrapper .input-label", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['labelColor'], 'device_control' => true, ) ); } if ( isset( $this->attrs['labelTypography'] ) ) { $this->inject_typography( array( 'selector' => ".{$this->element_id} .label-wrapper .input-label", 'property' => function ( $value ) {}, 'value' => $this->attrs['labelTypography'], 'device_control' => false, ) ); } if ( isset( $this->attrs['labelPadding'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .label-wrapper", 'property' => function ( $value ) { return $this->handle_dimension( $value, 'padding' ); }, 'value' => $this->attrs['labelPadding'], 'device_control' => true, ) ); } if ( isset( $this->attrs['labelMargin'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .label-wrapper", 'property' => function ( $value ) { return $this->handle_dimension( $value, 'margin' ); }, 'value' => $this->attrs['labelMargin'], 'device_control' => true, ) ); } if ( isset( $this->attrs['labelRequireColor'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .label-wrapper .required-badge", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['labelRequireColor'], 'device_control' => true, ) ); } if ( isset( $this->attrs['helperColor'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .input-helper", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['helperColor'], 'device_control' => true, ) ); } if ( isset( $this->attrs['helperTypography'] ) ) { $this->inject_typography( array( 'selector' => ".{$this->element_id} .input-helper", 'property' => function ( $value ) {}, 'value' => $this->attrs['helperTypography'], 'device_control' => false, ) ); } if ( isset( $this->attrs['helperPadding'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .input-helper", 'property' => function ( $value ) { return $this->handle_dimension( $value, 'padding' ); }, 'value' => $this->attrs['helperPadding'], 'device_control' => true, ) ); } if ( isset( $this->attrs['warningColor'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .validation-error", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['warningColor'], 'device_control' => true, ) ); } if ( isset( $this->attrs['warningTypography'] ) ) { $this->inject_typography( array( 'selector' => ".{$this->element_id} .validation-error", 'property' => function ( $value ) {}, 'value' => $this->attrs['warningTypography'], 'device_control' => false, ) ); } if ( isset( $this->attrs['inputHeight'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return "height: {$value}px;"; }, 'value' => $this->attrs['inputHeight'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputPadding'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_dimension( $value, 'padding' ); }, 'value' => $this->attrs['inputPadding'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputMargin'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_dimension( $value, 'margin' ); }, 'value' => $this->attrs['inputMargin'], 'device_control' => true, ) ); } if ( isset( $this->attrs['placeholderColor'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input::placeholder", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['placeholderColor'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputTypography'] ) ) { $this->inject_typography( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) {}, 'value' => $this->attrs['inputTypography'], 'device_control' => false, ) ); } if ( isset( $this->attrs['inputColorNormal'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['inputColorNormal'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBgColorNormal'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_color( $value, 'background-color' ); }, 'value' => $this->attrs['inputBgColorNormal'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBorderNormal'] ) ) { $this->handle_border( 'inputBorderNormal', ".{$this->element_id} .gutenverse-input" ); } if ( isset( $this->attrs['inputBorderNormalResponsive'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_border_responsive( $value ); }, 'value' => $this->attrs['inputBorderNormalResponsive'], 'device_control' => true, 'skip_device' => array( 'Desktop', ), ) ); } if ( isset( $this->attrs['inputColorHover'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:hover", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['inputColorHover'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBgColorHover'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:hover", 'property' => function ( $value ) { return $this->handle_color( $value, 'background-color' ); }, 'value' => $this->attrs['inputBgColorHover'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBorderHover'] ) ) { $this->handle_border( 'inputBorderHover', ".{$this->element_id} .gutenverse-input:hover" ); } if ( isset( $this->attrs['inputBorderHoverResponsive'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:hover", 'property' => function ( $value ) { return $this->handle_border_responsive( $value ); }, 'value' => $this->attrs['inputBorderHoverResponsive'], 'device_control' => true, 'skip_device' => array( 'Desktop', ), ) ); } if ( isset( $this->attrs['inputColorFocus'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:focus, .{$this->element_id} .gutenverse-input:focus-visible", 'property' => function ( $value ) { return $this->handle_color( $value, 'color' ); }, 'value' => $this->attrs['inputColorFocus'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBgColorFocus'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:focus, .{$this->element_id} .gutenverse-input:focus-visible", 'property' => function ( $value ) { return $this->handle_color( $value, 'background-color' ); }, 'value' => $this->attrs['inputBgColorFocus'], 'device_control' => true, ) ); } if ( isset( $this->attrs['inputBorderFocus'] ) ) { $this->handle_border( 'inputBorderFocus', ".{$this->element_id} .gutenverse-input:focus, .{$this->element_id} .gutenverse-input:focus-visible" ); } if ( isset( $this->attrs['inputBorderFocusResponsive'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:focus, .{$this->element_id} .gutenverse-input:focus-visible", 'property' => function ( $value ) { return $this->handle_border_responsive( $value ); }, 'value' => $this->attrs['inputBorderFocusResponsive'], 'device_control' => true, 'skip_device' => array( 'Desktop', ), ) ); } if ( isset( $this->attrs['inputAreaBoxShadow'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input", 'property' => function ( $value ) { return $this->handle_box_shadow( $value ); }, 'value' => $this->attrs['inputAreaBoxShadow'], 'device_control' => false, ) ); } if ( isset( $this->attrs['inputAreaBoxShadowHover'] ) ) { $this->inject_style( array( 'selector' => ".{$this->element_id} .gutenverse-input:hover", 'property' => function ( $value ) { return $this->handle_box_shadow( $value ); }, 'value' => $this->attrs['inputAreaBoxShadowHover'], 'device_control' => false, ) ); } } }
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings