PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / trunk
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster vtrunk
2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 1.8.1 All 42 releases
sellkit / includes / elementor / modules / optin / fields / textarea.php

textarea.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster trunk, at includes/elementor/modules/optin/fields/textarea.php

44 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || die();
4
5 class Sellkit_Elementor_Optin_Field_Textarea extends Sellkit_Elementor_Optin_Field_Base {
6
7 public static function get_field_type() {
8 return 'textarea';
9 }
10
11 public function get_input_type() {
12 return 'textarea';
13 }
14
15 public function add_field_render_attribute() {
16 parent::add_field_render_attribute();
17
18 $this->widget->add_render_attribute( 'field-' . $this->get_id(), 'rows', $this->field['rows'] );
19 }
20
21 public function render_content() {
22 ?>
23 <textarea <?php echo $this->widget->get_render_attribute_string( 'field-' . esc_attr( $this->get_id() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor-generated attributes. ?>><?php echo wp_kses_post( $this->field['field_value'] ); ?></textarea>
24 <?php
25 }
26
27 public static function get_additional_controls() {
28 $commons = parent::get_common_controls();
29
30 return [
31 'label' => $commons['label'],
32 'field_value' => $commons['field_value'],
33 'rows' => [
34 'label' => esc_html__( 'Rows', 'sellkit' ),
35 'type' => 'number',
36 'default' => 5,
37 'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
38 ],
39 'required' => $commons['required'],
40 'width_responsive' => $commons['width_responsive'],
41 ];
42 }
43 }
44