PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.12
ShopBuilder – WooCommerce Builder For Elementor v2.1.12
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 / ArchiveViewModeSettings.php

ArchiveViewModeSettings.php in ShopBuilder – WooCommerce Builder For Elementor 2.1.12, at app/Elementor/Widgets/Controls/ArchiveViewModeSettings.php

217 lines 6.2 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 RadiusTheme\SB\Elementor\Helper\ControlHelper;
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 ArchiveViewModeSettings {
21 /**
22 * Widget Field
23 *
24 * @return array
25 */
26 public static function widget_fields( $widget ) {
27 $alignment = ControlHelper::alignment();
28 unset( $alignment['justify'] );
29 $fields = [
30 'mode_button_style' => [
31 'mode' => 'section_start',
32 'label' => esc_html__( 'Icon Settings', 'shopbuilder' ),
33 ],
34 'view_mode' => [
35 'label' => esc_html__( 'Default Selected View', 'shopbuilder' ),
36 'type' => 'choose',
37 'options' => [
38 'grid' => [
39 'title' => esc_html__( 'Grid', 'shopbuilder' ),
40 'icon' => 'eicon-posts-grid',
41 ],
42 'list' => [
43 'title' => esc_html__( 'List', 'shopbuilder' ),
44 'icon' => 'eicon-post-list',
45 ],
46 ],
47 'default' => 'grid',
48 'separator' => 'default',
49 ],
50 'icon_size' => [
51 'label' => esc_html__( 'Icon Size (px)', 'shopbuilder' ),
52 'type' => 'slider',
53 'size_units' => [ 'px' ],
54 'selectors' => [
55 $widget->selectors['icon_size'] => 'font-size: {{SIZE}}{{UNIT}};',
56 ],
57 ],
58 'mode_button_align' => [
59 'mode' => 'responsive',
60 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
61 'type' => 'choose',
62 'options' => $alignment,
63 'selectors' => [
64 $widget->selectors['mode_button_align'] => 'text-align: {{VALUE}};',
65 ],
66 ],
67 'mode_button_height' => [
68 'label' => esc_html__( 'Height (px)', 'shopbuilder' ),
69 'type' => 'slider',
70 'size_units' => [ 'px' ],
71 'default' => [
72 'size' => 40,
73 ],
74 'selectors' => [
75 $widget->selectors['mode_button_height'] => 'height: {{SIZE}}{{UNIT}};',
76 ],
77 ],
78 'mode_button_width' => [
79 'mode' => 'responsive',
80 'label' => esc_html__( 'Width', 'shopbuilder' ),
81 'type' => 'slider',
82 'size_units' => [ 'px' ],
83 'range' => [
84 'px' => [
85 'min' => 0,
86 'max' => 100,
87 ],
88 ],
89 'default' => [
90 'size' => 40,
91 'unit' => 'px',
92 ],
93 'selectors' => [
94 $widget->selectors['mode_button_width'] => 'width: {{SIZE}}{{UNIT}};',
95 ],
96 ],
97 'mode_button_gap' => [
98 'label' => esc_html__( 'Gap (px)', 'shopbuilder' ),
99 'type' => 'slider',
100 'size_units' => [ 'px' ],
101 'default' => [
102 'size' => 5,
103 ],
104 'selectors' => [
105 $widget->selectors['mode_button_gap'] => 'gap: {{SIZE}}{{UNIT}};',
106 ],
107
108 ],
109 'mode_button_color' => [
110 'label' => esc_html__( 'Color', 'shopbuilder' ),
111 'type' => 'color',
112 'selectors' => [
113 $widget->selectors['mode_button_color'] => 'color: {{VALUE}} !important;',
114 ],
115 ],
116 'mode_button_tabs_start' => [
117 'mode' => 'tabs_start',
118 ],
119 // Tab For normal view.
120 'mode_button_normal' => [
121 'mode' => 'tab_start',
122 'label' => esc_html__( 'Normal', 'shopbuilder' ),
123 ],
124 'mode_button_bg_color' => [
125 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
126 'type' => 'color',
127 'separator' => 'default',
128 'selectors' => [
129 $widget->selectors['mode_button_bg_color'] => 'background-color: {{VALUE}};',
130 ],
131 ],
132 'text_color' => [
133 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
134 'type' => 'color',
135 'default' => '',
136 'selectors' => [
137 $widget->selectors['text_color'] => 'color: {{VALUE}};',
138 ],
139 ],
140 'mode_button_border' => [
141 'mode' => 'group',
142 'type' => 'border',
143 'selector' => $widget->selectors['mode_button_border'],
144 'size_units' => [ 'px' ],
145 ],
146 'mode_button_normal_end' => [
147 'mode' => 'tab_end',
148 ],
149 'mode_button_hover' => [
150 'mode' => 'tab_start',
151 'label' => esc_html__( 'Hover', 'shopbuilder' ),
152 ],
153 'mode_button_bg_hover_color' => [
154 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
155 'type' => 'color',
156 'separator' => 'default',
157 'selectors' => [
158 $widget->selectors['mode_button_bg_hover_color'] => 'background-color: {{VALUE}};',
159 ],
160 ],
161 'text_hover_color' => [
162 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
163 'type' => 'color',
164 'default' => '',
165 'selectors' => [
166 $widget->selectors['text_hover_color'] => 'color: {{VALUE}};',
167 ],
168 ],
169 'mode_button_border_hover_color' => [
170 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
171 'type' => 'color',
172 'default' => '',
173 'selectors' => [
174 $widget->selectors['mode_button_border_hover_color'] => 'border-color: {{VALUE}};',
175 ],
176 ],
177 'mode_button_hover_end' => [
178 'mode' => 'tab_end',
179 ],
180 'mode_button_tabs_end' => [
181 'mode' => 'tabs_end',
182 ],
183 'mode_button_radius' => [
184 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
185 'type' => 'dimensions',
186 'mode' => 'responsive',
187 'size_units' => [ 'px', '%', 'em' ],
188 'selectors' => [
189 $widget->selectors['mode_button_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
190 ],
191 ],
192 'mode_button_grid_icon' => [
193 'label' => esc_html__( 'Grid View Icon', 'shopbuilder' ),
194 'type' => 'icons',
195 'fa4compatibility' => 'icon',
196 'default' => [
197 'value' => 'rtsb-icon rtsb-icon-grid',
198 'library' => 'rtsb-fonts',
199 ],
200 ],
201 'mode_button_list_icon' => [
202 'label' => esc_html__( 'List View Icon', 'shopbuilder' ),
203 'type' => 'icons',
204 'fa4compatibility' => 'icon',
205 'default' => [
206 'value' => 'rtsb-icon rtsb-icon-list',
207 'library' => 'rtsb-fonts',
208 ],
209 ],
210 'mode_button_button_style_end' => [
211 'mode' => 'section_end',
212 ],
213 ];
214 return $fields;
215 }
216 }
217