PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.2
ShopBuilder – WooCommerce Builder For Elementor v2.0.2
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/ButtonSettings.php +158 -156 2.1.32.0.2 View file →
@@ -8,9 +8,9 @@
8 8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9 9
10 10 // Do not allow directly accessing this file.
11 11 if ( ! defined( 'ABSPATH' ) ) {
12 - exit( 'This script cannot be accessed directly.' );
12 + exit( 'This script cannot be accessed directly.' );
13 13 }
14 14
15 15 /**
16 16 * Product Description class
@@ -16,170 +16,172 @@
16 16 * Product Description class
17 17 */
18 18 class ButtonSettings {
19 19
20 - /**
21 - * Widget Field
22 - *
23 - * @return array
24 - */
25 - public static function style_settings( $widget ) {
20 + /**
21 + * Widget Field
22 + *
23 + * @return array
24 + */
25 + public static function style_settings( $widget ) {
26 26
27 - $fields = [
28 - 'button_section_start' => [
29 - 'mode' => 'section_start',
30 - 'label' => esc_html__( 'Button', 'shopbuilder' ),
31 - 'tab' => 'style',
32 - ],
33 - 'button_typography' => [
34 - 'mode' => 'group',
35 - 'type' => 'typography',
36 - 'label' => esc_html__( 'Typography', 'shopbuilder' ),
37 - 'selector' => $widget->selectors['button_typography'],
38 - ],
39 - 'button_height' => [
40 - 'label' => esc_html__( 'Height', 'shopbuilder' ),
41 - 'type' => 'slider',
42 - 'range' => [
43 - 'px' => [
44 - 'min' => 10,
45 - 'max' => 200,
46 - ],
47 - ],
48 - 'selectors' => [
49 - $widget->selectors['button_height'] => 'height: {{SIZE}}{{UNIT}};',
50 - ],
51 - ],
27 + $fields = [
28 + 'button_section_start' => [
29 + 'mode' => 'section_start',
30 + 'label' => esc_html__( 'Button', 'shopbuilder' ),
31 + 'tab' => 'style',
32 + ],
33 + 'button_typography' => [
34 + 'mode' => 'group',
35 + 'type' => 'typography',
36 + 'label' => esc_html__( 'Typography', 'shopbuilder' ),
37 + 'selector' => $widget->selectors['button_typography'],
38 + ],
39 + 'button_height' => [
40 + 'label' => esc_html__( 'Height', 'shopbuilder' ),
41 + 'type' => 'slider',
42 + 'range' => [
43 + 'px' => [
44 + 'min' => 10,
45 + 'max' => 200,
46 + ],
47 + ],
48 + 'selectors' => [
49 + $widget->selectors['button_height'] => 'height: {{SIZE}}{{UNIT}};',
50 + ],
51 + ],
52 52
53 - 'button_width' => [
54 - 'label' => esc_html__( 'Width', 'shopbuilder' ),
55 - 'size_units' => [ 'px', '%' ],
56 - 'mode' => 'responsive',
57 - 'type' => 'slider',
58 - 'range' => [
59 - 'px' => [
60 - 'min' => 10,
61 - 'max' => 900,
62 - ],
63 - '%' => [
64 - 'min' => 0,
65 - 'max' => 100,
66 - ],
67 - ],
68 - 'selectors' => [
69 - $widget->selectors['button_width'] => 'width: {{SIZE}}{{UNIT}};',
70 - ],
71 - ],
53 + 'button_width' => [
54 + 'label' => esc_html__( 'Width', 'shopbuilder' ),
55 + 'size_units' => [ 'px', '%' ],
56 + 'mode' => 'responsive',
57 + 'type' => 'slider',
58 + 'range' => [
59 + 'px' => [
60 + 'min' => 10,
61 + 'max' => 900,
62 + ],
63 + '%' => [
64 + 'min' => 0,
65 + 'max' => 100,
66 + ],
67 + ],
68 + 'selectors' => [
69 + $widget->selectors['button_width'] => 'width: {{SIZE}}{{UNIT}};',
70 + ],
71 + ],
72 72
73 - 'button_tabs_start' => [
74 - 'mode' => 'tabs_start',
75 - ],
76 - 'button_normal' => [
77 - 'mode' => 'tab_start',
78 - 'label' => esc_html__( 'Normal', 'shopbuilder' ),
79 - ],
80 - 'button_text_color_normal' => [
81 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
82 - 'type' => 'color',
83 73
84 - 'separator' => 'default',
85 - 'selectors' => [
86 - $widget->selectors['button_text_color_normal'] => 'color: {{VALUE}}!important;',
87 - ],
88 - ],
89 - 'button_bg_color_normal' => [
90 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
91 - 'type' => 'color',
74 + 'button_tabs_start' => [
75 + 'mode' => 'tabs_start',
76 + ],
77 + 'button_normal' => [
78 + 'mode' => 'tab_start',
79 + 'label' => esc_html__( 'Normal', 'shopbuilder' ),
80 + ],
81 + 'button_text_color_normal' => [
82 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
83 + 'type' => 'color',
92 84
93 - 'selectors' => [
94 - $widget->selectors['button_bg_color_normal'] => 'background-color: {{VALUE}} !important;',
95 - ],
96 - ],
85 + 'separator' => 'default',
86 + 'selectors' => [
87 + $widget->selectors['button_text_color_normal'] => 'color: {{VALUE}}!important;',
88 + ],
89 + ],
90 + 'button_bg_color_normal' => [
91 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
92 + 'type' => 'color',
97 93
98 - 'button_border' => [
99 - 'mode' => 'group',
100 - 'type' => 'border',
101 - 'selector' => $widget->selectors['button_border'],
102 - 'size_units' => [ 'px' ],
103 - ],
104 - 'button_normal_end' => [
105 - 'mode' => 'tab_end',
106 - ],
107 - 'button_hover' => [
108 - 'mode' => 'tab_start',
109 - 'label' => esc_html__( 'Hover', 'shopbuilder' ),
110 - ],
111 - 'button_text_color_hover' => [
112 - 'label' => esc_html__( 'Color', 'shopbuilder' ),
113 - 'type' => 'color',
94 + 'selectors' => [
95 + $widget->selectors['button_bg_color_normal'] => 'background-color: {{VALUE}};',
96 + ],
97 + ],
114 98
115 - 'separator' => 'default',
116 - 'selectors' => [
117 - $widget->selectors['button_text_color_hover'] => 'color: {{VALUE}}!important;',
118 - ],
119 - ],
120 - 'button_bg_color_hover' => [
121 - 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
122 - 'type' => 'color',
99 + 'button_border' => [
100 + 'mode' => 'group',
101 + 'type' => 'border',
102 + 'selector' => $widget->selectors['button_border'],
103 + 'size_units' => [ 'px' ],
104 + ],
105 + 'button_normal_end' => [
106 + 'mode' => 'tab_end',
107 + ],
108 + 'button_hover' => [
109 + 'mode' => 'tab_start',
110 + 'label' => esc_html__( 'Hover', 'shopbuilder' ),
111 + ],
112 + 'button_text_color_hover' => [
113 + 'label' => esc_html__( 'Color', 'shopbuilder' ),
114 + 'type' => 'color',
123 115
124 - 'selectors' => [
125 - $widget->selectors['button_bg_color_hover'] => 'background-color: {{VALUE}} !important;',
126 - ],
127 - ],
128 - 'button_border_hover_color' => [
129 - 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
130 - 'type' => 'color',
116 + 'separator' => 'default',
117 + 'selectors' => [
118 + $widget->selectors['button_text_color_hover'] => 'color: {{VALUE}}!important;',
119 + ],
120 + ],
121 + 'button_bg_color_hover' => [
122 + 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
123 + 'type' => 'color',
131 124
132 - 'selectors' => [
133 - $widget->selectors['button_border_hover_color'] => 'border-color: {{VALUE}};',
134 - ],
135 - ],
136 - 'button_hover_end' => [
137 - 'mode' => 'tab_end',
138 - ],
139 - 'button_tabs_end' => [
140 - 'mode' => 'tabs_end',
141 - ],
142 - 'button_border_radius' => [
143 - 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
144 - 'type' => 'dimensions',
145 - 'default' => [
146 - 'top' => '5',
147 - 'right' => '5',
148 - 'bottom' => '5',
149 - 'left' => '5',
150 - 'unit' => 'px',
151 - 'isLinked' => true,
152 - ],
153 - 'size_units' => [ 'px' ],
154 - 'separator' => 'before',
155 - 'selectors' => [
156 - $widget->selectors['button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
157 - ],
158 - ],
159 - 'button_padding' => [
160 - 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
161 - 'type' => 'dimensions',
162 - 'mode' => 'responsive',
163 - 'size_units' => [ 'px' ],
164 - 'selectors' => [
165 - $widget->selectors['button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
166 - ],
167 - 'separator' => 'before',
168 - ],
125 + 'selectors' => [
126 + $widget->selectors['button_bg_color_hover'] => 'background-color: {{VALUE}};',
127 + ],
128 + ],
129 + 'button_border_hover_color' => [
130 + 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
131 + 'type' => 'color',
169 132
170 - 'button_margin' => [
171 - 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
172 - 'type' => 'dimensions',
173 - 'mode' => 'responsive',
174 - 'size_units' => [ 'px' ],
175 - 'selectors' => [
176 - $widget->selectors['button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
177 - ],
178 - ],
179 - 'button_section_end' => [
180 - 'mode' => 'section_end',
181 - ],
182 - ];
183 - return $fields;
184 - }
133 + 'selectors' => [
134 + $widget->selectors['button_border_hover_color'] => 'border-color: {{VALUE}};',
135 + ],
136 + ],
137 + 'button_hover_end' => [
138 + 'mode' => 'tab_end',
139 + ],
140 + 'button_tabs_end' => [
141 + 'mode' => 'tabs_end',
142 + ],
143 + 'button_border_radius' => [
144 + 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
145 + 'type' => 'dimensions',
146 + 'default' => [
147 + 'top' => '5',
148 + 'right' => '5',
149 + 'bottom' => '5',
150 + 'left' => '5',
151 + 'unit' => 'px',
152 + 'isLinked' => true,
153 + ],
154 + 'size_units' => [ 'px' ],
155 + 'separator' => 'before',
156 + 'selectors' => [
157 + $widget->selectors['button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
158 + ],
159 + ],
160 + 'button_padding' => [
161 + 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
162 + 'type' => 'dimensions',
163 + 'mode' => 'responsive',
164 + 'size_units' => [ 'px' ],
165 + 'selectors' => [
166 + $widget->selectors['button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
167 + ],
168 + 'separator' => 'before',
169 + ],
170 +
171 + 'button_margin' => [
172 + 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
173 + 'type' => 'dimensions',
174 + 'mode' => 'responsive',
175 + 'size_units' => [ 'px' ],
176 + 'selectors' => [
177 + $widget->selectors['button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
178 + ],
179 + ],
180 + 'button_section_end' => [
181 + 'mode' => 'section_end',
182 + ],
183 + ];
184 + return $fields;
185 + }
186 +
185 187 }