PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.3
Elementor Website Builder – more than just a page builder v3.2.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/controls/number.php +3 -32 4.2.03.2.3 View file →
@@ -64,13 +64,14 @@
64 64 * @since 1.0.0
65 65 * @access public
66 66 */
67 67 public function content_template() {
68 + $control_uid = $this->get_control_uid();
68 69 ?>
69 70 <div class="elementor-control-field">
70 - <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
71 + <label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label>
71 72 <div class="elementor-control-input-wrapper elementor-control-dynamic-switcher-wrapper">
72 - <input id="<?php $this->print_control_uid(); ?>" type="number" min="{{ data.min }}" max="{{ data.max }}" step="{{ data.step }}" class="tooltip-target elementor-control-tag-area elementor-control-unit-2" data-tooltip="{{ data.title }}" data-setting="{{ data.name }}" placeholder="{{ view.getControlPlaceholder() }}" />
73 + <input id="<?php echo $control_uid; ?>" type="number" min="{{ data.min }}" max="{{ data.max }}" step="{{ data.step }}" class="tooltip-target elementor-control-tag-area elementor-control-unit-2" data-tooltip="{{ data.title }}" title="{{ data.title }}" data-setting="{{ data.name }}" placeholder="{{ data.placeholder }}" />
73 74 </div>
74 75 </div>
75 76 <# if ( data.description ) { #>
76 77 <div class="elementor-control-field-description">{{{ data.description }}}</div>
@@ -75,36 +76,6 @@
75 76 <# if ( data.description ) { #>
76 77 <div class="elementor-control-field-description">{{{ data.description }}}</div>
77 78 <# } #>
78 79 <?php
79 - }
80 -
81 - public function get_value( $control, $settings ) {
82 - $value = parent::get_value( $control, $settings );
83 -
84 - if ( '' === $value || null === $value ) {
85 - return $value;
86 - }
87 -
88 - if ( ! is_numeric( $value ) ) {
89 - return ! empty( $control['default'] ) ? $control['default'] : '';
90 - }
91 -
92 - return $value;
93 - }
94 -
95 - public function get_style_value( $css_property, $control_value, array $control_data ) {
96 - if ( 'DEFAULT' === $css_property ) {
97 - return $control_data['default'];
98 - }
99 -
100 - if ( '' === $control_value || null === $control_value ) {
101 - return $control_value;
102 - }
103 -
104 - if ( ! is_numeric( $control_value ) ) {
105 - return ! empty( $control_data['default'] ) ? $control_data['default'] : '';
106 - }
107 -
108 - return $control_value;
109 80 }
110 81 }