PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.4
ShopBuilder – WooCommerce Builder For Elementor v1.1.4
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 1.1.4, at app/Elementor/Widgets/Controls/ArchiveViewModeSettings.php

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