PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.13
Elementor Website Builder – more than just a page builder v3.0.13
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/select2.php +4 -6 4.0.73.0.13 View file →
@@ -45,12 +45,9 @@
45 45 protected function get_default_settings() {
46 46 return [
47 47 'options' => [],
48 48 'multiple' => false,
49 - // Select2 library options
50 49 'select2options' => [],
51 - // the lockedOptions array can be passed option keys. The passed option keys will be non-deletable.
52 - 'lockedOptions' => [],
53 50 ];
54 51 }
55 52
56 53 /**
@@ -63,16 +60,17 @@
63 60 * @since 1.0.0
64 61 * @access public
65 62 */
66 63 public function content_template() {
64 + $control_uid = $this->get_control_uid();
67 65 ?>
68 66 <div class="elementor-control-field">
69 67 <# if ( data.label ) {#>
70 - <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label>
68 + <label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label>
71 69 <# } #>
72 70 <div class="elementor-control-input-wrapper elementor-control-unit-5">
73 71 <# var multiple = ( data.multiple ) ? 'multiple' : ''; #>
74 - <select id="<?php $this->print_control_uid(); ?>" class="elementor-select2" type="select2" {{ multiple }} data-setting="{{ data.name }}">
72 + <select id="<?php echo $control_uid; ?>" class="elementor-select2" type="select2" {{ multiple }} data-setting="{{ data.name }}">
75 73 <# _.each( data.options, function( option_title, option_value ) {
76 74 var value = data.controlValue;
77 75 if ( typeof value == 'string' ) {
78 76 var selected = ( option_value === value ) ? 'selected' : '';
@@ -80,9 +78,9 @@
80 78 var value = _.values( value );
81 79 var selected = ( -1 !== value.indexOf( option_value ) ) ? 'selected' : '';
82 80 }
83 81 #>
84 - <option {{ selected }} value="{{ _.escape( option_value ) }}">{{{ _.escape( option_title ) }}}</option>
82 + <option {{ selected }} value="{{ option_value }}">{{{ option_title }}}</option>
85 83 <# } ); #>
86 84 </select>
87 85 </div>
88 86 </div>