← All changes
|
app/Elementor/Widgets/Controls/QuantityFields.php
+20
-21
2.1.13
→
3.2.6
View file →
| @@ -26,14 +26,14 @@ | ||
| 26 | 26 | * @return array |
| 27 | 27 | */ |
| 28 | 28 | public static function quantity_fields( $widget ) { |
| 29 | 29 | $fields = [ |
| 30 | - 'sec_quantity' => [ | |
| 30 | + 'sec_quantity' => [ | |
| 31 | 31 | 'mode' => 'section_start', |
| 32 | 32 | 'label' => esc_html__( 'Quantity', 'shopbuilder' ), |
| 33 | 33 | ], |
| 34 | 34 | // TODO:: Control Type will be select image. |
| 35 | - 'quantity_style' => [ | |
| 35 | + 'quantity_style' => [ | |
| 36 | 36 | 'label' => esc_html__( 'Style', 'shopbuilder' ), |
| 37 | 37 | 'type' => 'select', |
| 38 | 38 | 'options' => [ |
| 39 | 39 | 'default' => esc_html__( 'Default', 'shopbuilder' ), |
| @@ -43,18 +43,18 @@ | ||
| 43 | 43 | ], |
| 44 | 44 | 'separator' => 'default', |
| 45 | 45 | 'default' => 'default', |
| 46 | 46 | ], |
| 47 | - 'show_inner_border' => [ | |
| 47 | + 'show_inner_border' => [ | |
| 48 | 48 | 'label' => esc_html__( 'Show Inner Border?', 'shopbuilder' ), |
| 49 | 49 | 'type' => 'switch', |
| 50 | 50 | 'description' => esc_html__( 'Switch on to Show inner border.', 'shopbuilder' ), |
| 51 | 51 | 'default' => 'yes', |
| 52 | - 'condition' => [ | |
| 52 | + 'condition' => [ | |
| 53 | 53 | 'quantity_style' => [ 'style-3', 'style-4' ], |
| 54 | 54 | ], |
| 55 | 55 | ], |
| 56 | - 'quantity_input_width' => [ | |
| 56 | + 'quantity_input_width' => [ | |
| 57 | 57 | 'label' => esc_html__( 'Quantity Field Width', 'shopbuilder' ), |
| 58 | 58 | 'type' => 'slider', |
| 59 | 59 | 'range' => [ |
| 60 | 60 | 'px' => [ |
| @@ -78,9 +78,9 @@ | ||
| 78 | 78 | 'selectors' => [ |
| 79 | 79 | $widget->selectors['quantity_button_width'] => 'width: {{SIZE}}{{UNIT}};', |
| 80 | 80 | ], |
| 81 | 81 | ], |
| 82 | - 'quantity_height' => [ | |
| 82 | + 'quantity_height' => [ | |
| 83 | 83 | 'label' => esc_html__( 'Quantity Height', 'shopbuilder' ), |
| 84 | 84 | 'type' => 'slider', |
| 85 | 85 | 'range' => [ |
| 86 | 86 | 'px' => [ |
| @@ -95,9 +95,9 @@ | ||
| 95 | 95 | $widget->selectors['quantity_height']['full'] => 'height: {{SIZE}}{{UNIT}};', |
| 96 | 96 | $widget->selectors['quantity_height']['half'] => 'height: calc( {{SIZE}}{{UNIT}} / 2 );', |
| 97 | 97 | ], |
| 98 | 98 | ], |
| 99 | - 'increment_icon' => [ | |
| 99 | + 'increment_icon' => [ | |
| 100 | 100 | 'label' => esc_html__( 'Increment Icon', 'shopbuilder' ), |
| 101 | 101 | 'type' => 'icons', |
| 102 | 102 | 'default' => [ |
| 103 | 103 | 'value' => 'fas fa-plus', |
| @@ -106,9 +106,9 @@ | ||
| 106 | 106 | 'condition' => [ |
| 107 | 107 | 'quantity_style!' => 'default', |
| 108 | 108 | ], |
| 109 | 109 | ], |
| 110 | - 'decrement_icon' => [ | |
| 110 | + 'decrement_icon' => [ | |
| 111 | 111 | 'label' => esc_html__( 'Decrement Icon', 'shopbuilder' ), |
| 112 | 112 | 'type' => 'icons', |
| 113 | 113 | 'default' => [ |
| 114 | 114 | 'value' => 'fas fa-minus', |
| @@ -117,9 +117,9 @@ | ||
| 117 | 117 | 'condition' => [ |
| 118 | 118 | 'quantity_style!' => 'default', |
| 119 | 119 | ], |
| 120 | 120 | ], |
| 121 | - 'quantity_style_end' => [ | |
| 121 | + 'quantity_style_end' => [ | |
| 122 | 122 | 'mode' => 'section_end', |
| 123 | 123 | ], |
| 124 | 124 | ]; |
| 125 | 125 | return $fields; |
| @@ -161,9 +161,10 @@ | ||
| 161 | 161 | 'default' => [ |
| 162 | 162 | 'size' => 15, |
| 163 | 163 | ], |
| 164 | 164 | 'selectors' => [ |
| 165 | - $widget->selectors['icon_size'] => 'font-size: {{SIZE}}{{UNIT}};', | |
| 165 | + $widget->selectors['icon_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};', | |
| 166 | + $widget->selectors['icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', | |
| 166 | 167 | ], |
| 167 | 168 | ], |
| 168 | 169 | 'quantitybox_border_color' => [ |
| 169 | 170 | 'label' => esc_html__( 'Border Color', 'shopbuilder' ), |
| @@ -233,10 +234,10 @@ | ||
| 233 | 234 | $widget->selectors['quantity_background_color'] => 'background: {{VALUE}}', |
| 234 | 235 | ], |
| 235 | 236 | ], |
| 236 | 237 | 'quantity_border' => [ |
| 237 | - 'mode' => 'group', | |
| 238 | - 'type' => 'border', | |
| 238 | + 'mode' => 'group', | |
| 239 | + 'type' => 'border', | |
| 239 | 240 | 'fields_options' => [ |
| 240 | 241 | 'border' => [ |
| 241 | 242 | 'label' => esc_html__( 'Quantity Field Border', 'shopbuilder' ), |
| 242 | 243 | 'label_block' => true, |
| @@ -244,9 +245,9 @@ | ||
| 244 | 245 | 'color' => [ |
| 245 | 246 | 'label' => esc_html__( 'Border Color', 'shopbuilder' ), |
| 246 | 247 | ], |
| 247 | 248 | ], |
| 248 | - 'selector' => $widget->selectors['quantity_border'], | |
| 249 | + 'selector' => $widget->selectors['quantity_border'], | |
| 249 | 250 | ], |
| 250 | 251 | 'quantity_radius' => [ |
| 251 | 252 | 'label' => esc_html__( 'Border Radius', 'shopbuilder' ), |
| 252 | 253 | 'size_units' => [ 'px', '%' ], |
| @@ -263,21 +264,21 @@ | ||
| 263 | 264 | $widget->selectors['qunatity_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 264 | 265 | ], |
| 265 | 266 | ], |
| 266 | 267 | 'quantity_increment_button_padding' => [ |
| 267 | - 'label' => esc_html__( 'Quantity Increment Button Padding', 'shopbuilder' ), | |
| 268 | + 'label' => esc_html__( 'Quantity Increment Button Padding', 'shopbuilder' ), | |
| 268 | 269 | 'type' => 'dimensions', |
| 269 | 270 | 'size_units' => [ 'px' ], |
| 270 | - 'selectors' => [ | |
| 271 | - $widget->selectors['quantity_increment_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 271 | + 'selectors' => [ | |
| 272 | + $widget->selectors['quantity_increment_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 272 | 273 | ], |
| 273 | 274 | ], |
| 274 | 275 | 'quantity_decrement_button_padding' => [ |
| 275 | - 'label' => esc_html__( 'Quantity Increment Button Padding', 'shopbuilder' ), | |
| 276 | + 'label' => esc_html__( 'Quantity Increment Button Padding', 'shopbuilder' ), | |
| 276 | 277 | 'type' => 'dimensions', |
| 277 | 278 | 'size_units' => [ 'px' ], |
| 278 | - 'selectors' => [ | |
| 279 | - $widget->selectors['quantity_decrement_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 279 | + 'selectors' => [ | |
| 280 | + $widget->selectors['quantity_decrement_button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', | |
| 280 | 281 | ], |
| 281 | 282 | ], |
| 282 | 283 | |
| 283 | 284 | 'quantity_style_wrapper_heading' => [ |
| @@ -317,7 +318,5 @@ | ||
| 317 | 318 | ], |
| 318 | 319 | ]; |
| 319 | 320 | return $fields; |
| 320 | 321 | } |
| 321 | - | |
| 322 | - | |
| 323 | 322 | } |