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 / number.php

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

49 lines 1.3 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_Number extends Sellkit_Elementor_Optin_Field_Text {
6
7 public static function get_field_type() {
8 return 'number';
9 }
10
11 public function get_input_type() {
12 return 'number';
13 }
14
15 public function add_field_render_attribute() {
16 parent::add_field_render_attribute();
17
18 if ( ! empty( $this->field['min'] ) ) {
19 $this->widget->add_render_attribute( 'field-' . $this->get_id(), 'min', $this->field['min'] );
20 }
21
22 if ( ! empty( $this->field['max'] ) ) {
23 $this->widget->add_render_attribute( 'field-' . $this->get_id(), 'max', $this->field['max'] );
24 }
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 'placeholder' => $commons['placeholder'],
34 'min' => [
35 'label' => esc_html__( 'Min Value', 'sellkit' ),
36 'type' => 'number',
37 'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
38 ],
39 'max' => [
40 'label' => esc_html__( 'Max Value', 'sellkit' ),
41 'type' => 'number',
42 'conditions' => [ 'terms' => [ parent::get_type_condition() ] ],
43 ],
44 'required' => $commons['required'],
45 'width_responsive' => $commons['width_responsive'],
46 ];
47 }
48 }
49