PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Elementor/Widgets/Controls/StyleFields.php +155 -25 2.1.23.2.6 View file →
@@ -189,8 +189,32 @@
189 189 $fields['advanced_color_tabs_end'] = $obj->end_tab_group();
190 190
191 191 $fields['wrapper_note'] = $obj->el_heading( esc_html__( 'Border', 'shopbuilder' ), 'before' );
192 192
193 + $fields['rtsb_el_wrapper_border'] = [
194 + 'mode' => 'group',
195 + 'type' => 'border',
196 + 'label' => esc_html__( 'Wrapper Border', 'shopbuilder' ),
197 + 'fields_options' => [
198 + 'border' => [
199 + 'label' => esc_html__( 'Wrapper Border Type', 'shopbuilder' ),
200 + 'label_block' => true,
201 + ],
202 + 'color' => [
203 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
204 + ],
205 + ],
206 + 'selector' => $css_selectors['rtsb_el_wrapper_border'],
207 + ];
208 +
209 + $fields['wrapper_border_radius'] = [
210 + 'mode' => 'responsive',
211 + 'type' => 'dimensions',
212 + 'label' => esc_html__( 'Wrapper Border Radius', 'shopbuilder' ),
213 + 'size_units' => [ 'px', '%', 'em' ],
214 + 'selectors' => [ $css_selectors['wrapper_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;' ],
215 + ];
216 +
193 217 $fields['rtsb_el_element_border'] = [
194 218 'mode' => 'group',
195 219 'type' => 'border',
196 220 'label' => esc_html__( 'Element Border', 'shopbuilder' ),
@@ -202,8 +226,9 @@
202 226 'color' => [
203 227 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
204 228 ],
205 229 ],
230 + 'separator' => 'before',
206 231 'selector' => $css_selectors['rtsb_el_element_border'],
207 232 ];
208 233
209 234 $fields['element_border_hover_color'] = [
@@ -233,8 +258,9 @@
233 258 'color' => [
234 259 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
235 260 ],
236 261 ],
262 + 'separator' => 'before',
237 263 'selector' => $css_selectors['rtsb_el_content_border'],
238 264 ];
239 265
240 266 $fields['content_border_hover_color'] = [
@@ -253,8 +279,16 @@
253 279 ];
254 280
255 281 $fields['advanced_spacing_note'] = $obj->el_heading( esc_html__( 'Spacing', 'shopbuilder' ), 'before' );
256 282
283 + $fields['wrapper_padding'] = [
284 + 'mode' => 'responsive',
285 + 'type' => 'dimensions',
286 + 'label' => esc_html__( 'Wrapper Padding', 'shopbuilder' ),
287 + 'size_units' => [ 'px', '%', 'em' ],
288 + 'selectors' => [ $css_selectors['wrapper_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
289 + ];
290 +
257 291 $fields['element_padding'] = [
258 292 'mode' => 'responsive',
259 293 'type' => 'dimensions',
260 294 'label' => esc_html__( 'Element Padding', 'shopbuilder' ),
@@ -456,16 +490,18 @@
456 490 $condition = [
457 491 'show_price' => [ 'yes' ],
458 492 ];
459 493 $selectors = [
460 - 'typography' => $css_selectors['typography'],
461 - 'alignment' => [ $css_selectors['alignment'] => 'text-align: {{VALUE}};' ],
462 - 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
463 - 'regular_color' => [ $css_selectors['regular_color'] => 'color: {{VALUE}};' ],
464 - 'border' => $css_selectors['border'],
465 - 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
466 - 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
467 - 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
494 + 'typography' => $css_selectors['typography'],
495 + 'sale_typography' => $css_selectors['sale_typography'],
496 + 'alignment' => [ $css_selectors['alignment'] => 'text-align: {{VALUE}};' ],
497 + 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
498 + 'regular_color' => [ $css_selectors['regular_color'] => 'color: {{VALUE}};' ],
499 + 'crossed_regular_color' => [ $css_selectors['crossed_regular_color'] => 'color: {{VALUE}};' ],
500 + 'border' => $css_selectors['border'],
501 + 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
502 + 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
503 + 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
468 504 ];
469 505
470 506 $fields = ControlHelper::general_elementor_style( 'product_price', $title, $obj, $condition, $selectors );
471 507
@@ -480,12 +516,30 @@
480 516 $fields['product_price_color_tabs_end'],
481 517 $fields['product_price_border_hover_color']
482 518 );
483 519
484 - $fields['product_price_color']['label'] = esc_html__( 'Sale Price Color', 'shopbuilder' );
485 - $fields['product_price_bg_color']['label'] = esc_html__( 'Regular Price Color', 'shopbuilder' );
486 - $fields['product_price_bg_color']['selectors'] = $selectors['regular_color'];
520 + $fields['rtsb_el_product_price_typography']['label'] = esc_html__( 'Regular Price Typography', 'shopbuilder' );
521 + $fields['product_price_color']['label'] = esc_html__( 'Sale Price Color', 'shopbuilder' );
522 + $fields['product_price_bg_color']['label'] = esc_html__( 'Regular Price Color', 'shopbuilder' );
523 + $fields['product_price_bg_color']['selectors'] = $selectors['regular_color'];
487 524
525 + $extra_controls['rtsb_el_product_sale_price_typography'] = [
526 + 'mode' => 'group',
527 + 'type' => 'typography',
528 + 'label' => esc_html__( 'Sale Price Typography', 'shopbuilder' ),
529 + 'selector' => $selectors['sale_typography'],
530 + ];
531 +
532 + $fields = Fns::insert_controls( 'rtsb_el_product_price_typography', $fields, $extra_controls );
533 +
534 + $extra_controls['crossed_regular_color'] = [
535 + 'type' => 'color',
536 + 'label' => esc_html__( 'Crossed Out Regular Price Color', 'shopbuilder' ),
537 + 'selectors' => ! empty( $selectors['crossed_regular_color'] ) ? $selectors['crossed_regular_color'] : [],
538 + ];
539 +
540 + $fields = Fns::insert_controls( 'product_price_border_note', $fields, $extra_controls );
541 +
488 542 return apply_filters( 'rtsb/elements/elementor/price_style_control', $fields, $obj );
489 543 }
490 544
491 545 /**
@@ -536,12 +590,8 @@
536 590 'min' => 0,
537 591 'max' => 100,
538 592 ],
539 593 ],
540 - // 'default' => [
541 - // 'unit' => 'px',
542 - // 'size' => 14,
543 - // ],
544 594 'selectors' => $selectors['typography'],
545 595 ];
546 596
547 597 $fields['product_rating_bg_color']['label'] = esc_html__( 'Star Border Color', 'shopbuilder' );
@@ -586,10 +636,10 @@
586 636 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
587 637 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
588 638 'border_color' => [ $css_selectors['border_color'] => 'border-color: {{VALUE}};' ],
589 639 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
590 - 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
591 - 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
640 + 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
641 + 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;' ],
592 642 'position_x' => [ $css_selectors['position_x'] => 'left: {{SIZE}}{{UNIT}};' ],
593 643 'position_x_right' => [ $css_selectors['position_x'] => 'right: {{SIZE}}{{UNIT}}; left: auto;' ],
594 644 'position_y' => [ $css_selectors['position_y'] => 'top: {{SIZE}}{{UNIT}};' ],
595 645 'position_y_bottom' => [ $css_selectors['position_y'] => 'bottom: {{SIZE}}{{UNIT}}; top:auto;' ],
@@ -736,9 +786,9 @@
736 786 $fields = Fns::insert_controls( 'badges_color_note', $fields, $extra_controls );
737 787
738 788 $extra_controls['badges_border_color'] = [
739 789 'type' => 'color',
740 - 'label' => esc_html__( 'border Color', 'shopbuilder' ),
790 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
741 791 'selectors' => ! empty( $selectors['border_color'] ) ? $selectors['border_color'] : [],
742 792 ];
743 793
744 794 $extra_controls['badges_border_radius'] = [
@@ -824,8 +874,78 @@
824 874 return apply_filters( 'rtsb/elements/elementor/categories_style_control', $fields, $obj );
825 875 }
826 876
827 877 /**
878 + * Product Categories Section
879 + *
880 + * @param object $obj Reference object.
881 + *
882 + * @return array
883 + */
884 + public static function product_brands( $obj ): array {
885 + $css_selectors = $obj->selectors['product_brands'];
886 + $title = esc_html__( 'Product Brands', 'shopbuilder' );
887 + $condition = [
888 + 'show_brands' => [ 'yes' ],
889 + ];
890 + $selectors = [
891 + 'typography' => $css_selectors['typography'],
892 + 'alignment' => [ $css_selectors['alignment'] => 'justify-content: {{VALUE}};' ],
893 + 'color' => [ $css_selectors['color'] => 'color: {{VALUE}};' ],
894 + 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}};' ],
895 + 'hover_color' => [ $css_selectors['hover_color'] => 'color: {{VALUE}};' ],
896 + 'hover_bg_color' => [ $css_selectors['hover_bg_color'] => 'background-color: {{VALUE}};' ],
897 + 'border' => $css_selectors['typography'],
898 + 'border_hover_color' => [ $css_selectors['border_hover_color'] => 'border-color: {{VALUE}};' ],
899 + 'border_radius' => [ $css_selectors['border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
900 + 'padding' => [ $css_selectors['padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
901 + 'margin' => [ $css_selectors['margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
902 + 'wrapper_margin' => [ $css_selectors['wrapper_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ],
903 + ];
904 +
905 + $fields = ControlHelper::general_elementor_style( 'product_brands', $title, $obj, $condition, $selectors );
906 +
907 + $fields['product_brands_alignment']['options'] = [
908 + 'flex-start' => [
909 + 'title' => esc_html__( 'Left', 'shopbuilder' ),
910 + 'icon' => 'eicon-text-align-left',
911 + ],
912 + 'center' => [
913 + 'title' => esc_html__( 'Center', 'shopbuilder' ),
914 + 'icon' => 'eicon-text-align-center',
915 + ],
916 + 'flex-end' => [
917 + 'title' => esc_html__( 'Right', 'shopbuilder' ),
918 + 'icon' => 'eicon-text-align-right',
919 + ],
920 + ];
921 +
922 + $extra_controls = [];
923 +
924 + $extra_controls['product_brands_radius'] = [
925 + 'mode' => 'responsive',
926 + 'type' => 'dimensions',
927 + 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
928 + 'size_units' => [ 'px', '%', 'em' ],
929 + 'selectors' => $selectors['border_radius'],
930 + ];
931 +
932 + $fields = Fns::insert_controls( 'product_brands_border_hover_color', $fields, $extra_controls, true );
933 +
934 + $extra_controls['product_brands_wrapper_margin'] = [
935 + 'mode' => 'responsive',
936 + 'type' => 'dimensions',
937 + 'label' => esc_html__( 'Wrapper Margin', 'shopbuilder' ),
938 + 'size_units' => [ 'px', '%', 'em' ],
939 + 'selectors' => $selectors['wrapper_margin'],
940 + ];
941 +
942 + $fields = Fns::insert_controls( 'product_brands_margin', $fields, $extra_controls, true );
943 +
944 + return apply_filters( 'rtsb/elements/elementor/brands_style_control', $fields, $obj );
945 + }
946 +
947 + /**
828 948 * Image Section
829 949 *
830 950 * @param object $obj Reference object.
831 951 * @param array $conditions Conditions.
@@ -938,9 +1058,9 @@
938 1058 'mode' => 'group',
939 1059 'type' => 'background',
940 1060 'label' => esc_html__( 'Image Overlay', 'shopbuilder' ),
941 1061 'types' => [ 'classic', 'gradient' ],
942 - 'exclude' => [ 'image' ],
1062 + 'exclude' => [ 'image' ], // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
943 1063 'fields_options' => [
944 1064 'background' => [
945 1065 'label' => esc_html__( 'Overlay Background Type', 'shopbuilder' ),
946 1066 ],
@@ -952,9 +1072,9 @@
952 1072 ],
953 1073 ],
954 1074 'selector' => $selectors['overlay'],
955 1075 'condition' => [
956 - 'show_overlay' => [ 'yes' ]
1076 + 'show_overlay' => [ 'yes' ],
957 1077 ],
958 1078 ];
959 1079
960 1080 $extra_controls['rtsb_el_image_styles_hover_overlay'] = [
@@ -961,9 +1081,9 @@
961 1081 'mode' => 'group',
962 1082 'type' => 'background',
963 1083 'label' => esc_html__( 'Hover Image Overlay', 'shopbuilder' ),
964 1084 'types' => [ 'classic', 'gradient' ],
965 - 'exclude' => [ 'image' ],
1085 + 'exclude' => [ 'image' ], // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
966 1086 'fields_options' => [
967 1087 'background' => [
968 1088 'label' => esc_html__( 'Hover Overlay Background Type', 'shopbuilder' ),
969 1089 ],
@@ -975,9 +1095,9 @@
975 1095 ],
976 1096 ],
977 1097 'selector' => $selectors['hover_overlay'],
978 1098 'condition' => [
979 - 'show_overlay' => [ 'yes' ]
1099 + 'show_overlay' => [ 'yes' ],
980 1100 ],
981 1101 ];
982 1102
983 1103 $fields = Fns::insert_controls( 'image_styles_typo_note', $fields, $extra_controls, true );
@@ -1624,9 +1744,12 @@
1624 1744 'layout' => [ 'grid-layout2', 'slider-layout2' ],
1625 1745 ];
1626 1746 $selectors = [
1627 1747 'typography' => $css_selectors['typography'],
1628 - 'icon_size' => [ $css_selectors['icon_size'] => 'font-size: {{SIZE}}{{UNIT}}' ],
1748 + 'icon_size' => [
1749 + $css_selectors['icon_size']['font_size'] => 'font-size: {{SIZE}}{{UNIT}} !important;',
1750 + $css_selectors['icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}} !important;',
1751 + ],
1629 1752 'hover_icon_spacing' => [ $css_selectors['hover_icon_spacing'] => 'margin-left: {{SIZE}}{{UNIT}}' ],
1630 1753 'color' => [ $css_selectors['color'] => 'color: {{VALUE}}' ],
1631 1754 'bg_color' => [ $css_selectors['bg_color'] => 'background-color: {{VALUE}}' ],
1632 1755 'icon_color' => [ $css_selectors['icon_color'] => 'color: {{VALUE}}' ],
@@ -1677,9 +1800,9 @@
1677 1800 ],
1678 1801 ],
1679 1802 'default' => [
1680 1803 'unit' => 'px',
1681 - 'size' => 3,
1804 + 'size' => 5,
1682 1805 ],
1683 1806 'condition' => [
1684 1807 'show_hover_btn_icon' => [ 'yes' ],
1685 1808 ],
@@ -2087,9 +2210,12 @@
2087 2210 public static function slider_buttons( $obj ): array {
2088 2211 $css_selectors = $obj->selectors['slider_buttons'];
2089 2212 $title = esc_html__( 'Slider Buttons', 'shopbuilder' );
2090 2213 $selectors = [
2091 - 'arrow_size' => [ $css_selectors['arrow_size'] => 'font-size: {{SIZE}}{{UNIT}};' ],
2214 + 'arrow_size' => [
2215 + $css_selectors['arrow_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};',
2216 + $css_selectors['arrow_size']['svg'] => 'width: {{SIZE}}{{UNIT}};',
2217 + ],
2092 2218 'arrow_width' => [ $css_selectors['arrow_width'] => 'width: {{SIZE}}{{UNIT}};' ],
2093 2219 'arrow_height' => [ $css_selectors['arrow_height'] => 'height: {{SIZE}}{{UNIT}};' ],
2094 2220 'arrow_line_height' => [ $css_selectors['arrow_line_height'] => 'line-height: {{SIZE}}{{UNIT}};' ],
2095 2221 'dot_width' => [ $css_selectors['dot_width'] => 'width: {{SIZE}}{{UNIT}};' ],
@@ -2153,8 +2279,12 @@
2153 2279 'min' => 1,
2154 2280 'max' => 100,
2155 2281 'step' => 1,
2156 2282 ],
2283 + ],
2284 + 'default' => [
2285 + 'unit' => 'px',
2286 + 'size' => 13,
2157 2287 ],
2158 2288 'condition' => $arrow_condition,
2159 2289 'selectors' => $selectors['arrow_size'],
2160 2290 ];