PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.1
ShopBuilder – WooCommerce Builder For Elementor v3.4.1
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
shopbuilder / app / Elementor / Widgets / Controls / ButtonSettings.php

ButtonSettings.php in ShopBuilder – WooCommerce Builder For Elementor 3.4.1, at app/Elementor/Widgets/Controls/ButtonSettings.php

187 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\Controls;
9
10 // Do not allow directly accessing this file.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit( 'This script cannot be accessed directly.' );
13 }
14
15 /**
16 * Product Description class
17 */
18 class ButtonSettings {
19
20 /**
21 * Widget Field
22 *
23 * @return array
24 */
25 public static function style_settings( $widget ) {
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 'mode' => 'responsive',
43 'range' => [
44 'px' => [
45 'min' => 10,
46 'max' => 200,
47 ],
48 ],
49 'selectors' => [
50 $widget->selectors['button_height'] => 'height: {{SIZE}}{{UNIT}}!important;',
51 ],
52 ],
53
54 'button_width' => [
55 'label' => esc_html__( 'Width', 'shopbuilder' ),
56 'size_units' => [ 'px', '%' ],
57 'mode' => 'responsive',
58 'type' => 'slider',
59 'range' => [
60 'px' => [
61 'min' => 10,
62 'max' => 900,
63 ],
64 '%' => [
65 'min' => 0,
66 'max' => 100,
67 ],
68 ],
69 'selectors' => [
70 $widget->selectors['button_width'] => 'width: {{SIZE}}{{UNIT}}!important;',
71 ],
72 ],
73
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',
84
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',
93
94 'selectors' => [
95 $widget->selectors['button_bg_color_normal'] => 'background-color: {{VALUE}} !important;',
96 ],
97 ],
98
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',
115
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',
124
125 'selectors' => [
126 $widget->selectors['button_bg_color_hover'] => 'background-color: {{VALUE}} !important;',
127 ],
128 ],
129 'button_border_hover_color' => [
130 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
131 'type' => 'color',
132
133 'selectors' => [
134 $widget->selectors['button_border_hover_color'] => 'border-color: {{VALUE}}!important;',
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}}!important;',
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 }
187