PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.0.0
ShopBuilder – WooCommerce Builder For Elementor v1.0.0
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 / NoticeSettings.php

NoticeSettings.php in ShopBuilder – WooCommerce Builder For Elementor 1.0.0, at app/Elementor/Widgets/Controls/NoticeSettings.php

233 lines 6.5 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 use Elementor\Controls_Manager;
11
12 // Do not allow directly accessing this file.
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 'This script cannot be accessed directly.' );
15 }
16
17 /**
18 * Product Description class
19 */
20 class NoticeSettings {
21 /**
22 * Widget Control Selectors
23 *
24 * @var array
25 */
26 private static $selectors = [];
27 /**
28 * Widget Field
29 *
30 * @return array
31 */
32 public static function widget_fields( $widget ) {
33 self::$selectors = $widget->selectors;
34 return self::notice_style() + self::button_style();
35 }
36 /**
37 * Widget Field
38 *
39 * @return array
40 */
41 public static function notice_style() {
42 $fields = [
43 'notice_section' => [
44 'mode' => 'section_start',
45 'label' => esc_html__( 'Notice', 'shopbuilder' ),
46 ],
47 'notice_typography' => [
48 'mode' => 'group',
49 'type' => 'typography',
50 'label' => esc_html__( 'Typography', 'shopbuilder' ),
51 'selector' => self::$selectors['notice_typography'],
52 ],
53 'notice_bg_color' => [
54 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
55 'type' => 'color',
56
57 'selectors' => [
58 self::$selectors['notice_bg_color'] => 'background-color: {{VALUE}};',
59 ],
60 ],
61 'notice_text_color' => [
62 'label' => esc_html__( 'Color', 'shopbuilder' ),
63 'type' => 'color',
64
65 'selectors' => [
66 self::$selectors['notice_text_color'] => 'color: {{VALUE}};',
67 ],
68 ],
69 'notice_border_color' => [
70 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
71 'type' => 'color',
72
73 'selectors' => [
74 self::$selectors['notice_border_color'] => 'border-color: {{VALUE}};',
75 ],
76 ],
77 'notice_icon_size' => [
78 'label' => esc_html__( 'Icon Size', 'shopbuilder' ),
79 'type' => 'slider',
80 'range' => [
81 'px' => [
82 'min' => 10,
83 'max' => 100,
84 ],
85 ],
86 'selectors' => [
87 self::$selectors['notice_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};',
88 ],
89 ],
90 'notice_icon_color' => [
91 'label' => esc_html__( 'Icon Color', 'shopbuilder' ),
92 'type' => 'color',
93
94 'selectors' => [
95 self::$selectors['notice_icon_color'] => 'color: {{VALUE}};',
96 ],
97 ],
98 'notice_padding' => [
99 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
100 'type' => 'dimensions',
101 'size_units' => [ 'px' ],
102 'selectors' => [
103 self::$selectors['notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
104 ],
105 'separator' => 'before',
106 ],
107 'notice_section_end' => [
108 'mode' => 'section_end',
109 ],
110 ];
111 return $fields;
112 }
113 /**
114 * Widget Field
115 *
116 * @return array
117 */
118 public static function button_style() {
119 $fields = [
120 'style_section' => [
121 'mode' => 'section_start',
122 'label' => esc_html__( 'Button', 'shopbuilder' ),
123 ],
124 'button_typography' => [
125 'mode' => 'group',
126 'type' => 'typography',
127 'label' => esc_html__( 'Typography', 'shopbuilder' ),
128 'selector' => self::$selectors['button_typography'],
129 ],
130 'button_tabs_start' => [
131 'mode' => 'tabs_start',
132 ],
133 // Tab For normal view.
134 'button_normal' => [
135 'mode' => 'tab_start',
136 'label' => esc_html__( 'Normal', 'shopbuilder' ),
137 ],
138 'button_text_color_normal' => [
139 'label' => esc_html__( 'Color', 'shopbuilder' ),
140 'type' => 'color',
141
142 'separator' => 'default',
143 'selectors' => [
144 self::$selectors['button_text_color_normal'] => 'color: {{VALUE}};',
145 ],
146 ],
147 'button_bg_color_normal' => [
148 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
149 'type' => 'color',
150
151 'selectors' => [
152 self::$selectors['button_bg_color_normal'] => 'background-color: {{VALUE}};',
153 ],
154 ],
155 'button_border' => [
156 'mode' => 'group',
157 'type' => 'border',
158 'selector' => self::$selectors['button_border'],
159 'size_units' => [ 'px' ],
160 ],
161 'button_normal_end' => [
162 'mode' => 'tab_end',
163 ],
164 'button_hover' => [
165 'mode' => 'tab_start',
166 'label' => esc_html__( 'Hover', 'shopbuilder' ),
167 ],
168 'button_text_color_hover' => [
169 'label' => esc_html__( 'Color', 'shopbuilder' ),
170 'type' => 'color',
171
172 'separator' => 'default',
173 'selectors' => [
174 self::$selectors['button_text_color_hover'] => 'color: {{VALUE}};',
175 ],
176 ],
177 'button_bg_color_hover' => [
178 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
179 'type' => 'color',
180
181 'selectors' => [
182 self::$selectors['button_bg_color_hover'] => 'background-color: {{VALUE}};',
183 ],
184 ],
185 'button_border_hover_color' => [
186 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
187 'type' => 'color',
188
189 'selectors' => [
190 self::$selectors['button_border_hover_color'] => 'border-color: {{VALUE}};',
191 ],
192 ],
193 'button_hover_end' => [
194 'mode' => 'tab_end',
195 ],
196 'button_tabs_end' => [
197 'mode' => 'tabs_end',
198 ],
199 'button_border_radius' => [
200 'label' => esc_html__( 'Border Radius (px)', 'shopbuilder' ),
201 'type' => 'dimensions',
202 'size_units' => [ 'px' ],
203 'selectors' => [
204 self::$selectors['button_border_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
205 ],
206 ],
207 'button_padding' => [
208 'label' => esc_html__( 'Padding (px)', 'shopbuilder' ),
209 'type' => 'dimensions',
210 'size_units' => [ 'px' ],
211 'selectors' => [
212 self::$selectors['button_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
213 ],
214 'separator' => 'before',
215 ],
216 'button_margin' => [
217 'label' => esc_html__( 'Margin (px)', 'shopbuilder' ),
218 'type' => 'dimensions',
219 'size_units' => [ 'px' ],
220 'selectors' => [
221 self::$selectors['button_margin'] => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
222 ],
223 ],
224 'style_section_end' => [
225 'mode' => 'section_end',
226 ],
227 ];
228 return $fields;
229 }
230
231
232 }
233