PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.4.0
ShopBuilder – WooCommerce Builder For Elementor v3.4.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 / ArchiveViewModeSettings.php

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

213 lines 6.1 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 * @param object $widget Elementor widget instance.
25 *
26 * @return array
27 */
28 public static function widget_fields( $widget ) {
29 $alignment = ControlHelper::alignment();
30 unset( $alignment['justify'] );
31 $fields = [
32 'mode_button_style' => [
33 'mode' => 'section_start',
34 'label' => esc_html__( 'Icon Settings', 'shopbuilder' ),
35 ],
36 'view_mode' => [
37 'label' => esc_html__( 'Default Selected View', 'shopbuilder' ),
38 'type' => 'choose',
39 'options' => [
40 'grid' => [
41 'title' => esc_html__( 'Grid', 'shopbuilder' ),
42 'icon' => 'eicon-posts-grid',
43 ],
44 'list' => [
45 'title' => esc_html__( 'List', 'shopbuilder' ),
46 'icon' => 'eicon-post-list',
47 ],
48 ],
49 'default' => 'grid',
50 'separator' => 'default',
51 ],
52 'icon_size' => [
53 'label' => esc_html__( 'Icon Size (px)', 'shopbuilder' ),
54 'type' => 'slider',
55 'size_units' => [ 'px' ],
56 'selectors' => [
57 $widget->selectors['icon_size']['icon'] => 'font-size: {{SIZE}}{{UNIT}};',
58 $widget->selectors['icon_size']['svg'] => 'width: {{SIZE}}{{UNIT}};',
59 ],
60 ],
61 'mode_button_align' => [
62 'mode' => 'responsive',
63 'label' => esc_html__( 'Alignment', 'shopbuilder' ),
64 'type' => 'choose',
65 'options' => $alignment,
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_tabs_start' => [
113 'mode' => 'tabs_start',
114 ],
115 // Tab For normal view.
116 'mode_button_normal' => [
117 'mode' => 'tab_start',
118 'label' => esc_html__( 'Normal', 'shopbuilder' ),
119 ],
120 'mode_button_bg_color' => [
121 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
122 'type' => 'color',
123 'separator' => 'default',
124 'selectors' => [
125 $widget->selectors['mode_button_bg_color'] => 'background-color: {{VALUE}};',
126 ],
127 ],
128 'text_color' => [
129 'label' => esc_html__( 'Color', 'shopbuilder' ),
130 'type' => 'color',
131 'default' => '',
132 'selectors' => [
133 $widget->selectors['text_color'] => 'color: {{VALUE}};',
134 ],
135 ],
136 'mode_button_border' => [
137 'mode' => 'group',
138 'type' => 'border',
139 'selector' => $widget->selectors['mode_button_border'],
140 'size_units' => [ 'px' ],
141 ],
142 'mode_button_normal_end' => [
143 'mode' => 'tab_end',
144 ],
145 'mode_button_hover' => [
146 'mode' => 'tab_start',
147 'label' => esc_html__( 'Hover', 'shopbuilder' ),
148 ],
149 'mode_button_bg_hover_color' => [
150 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
151 'type' => 'color',
152 'separator' => 'default',
153 'selectors' => [
154 $widget->selectors['mode_button_bg_hover_color'] => 'background-color: {{VALUE}};',
155 ],
156 ],
157 'text_hover_color' => [
158 'label' => esc_html__( 'Color', 'shopbuilder' ),
159 'type' => 'color',
160 'default' => '',
161 'selectors' => [
162 $widget->selectors['text_hover_color'] => 'color: {{VALUE}};',
163 ],
164 ],
165 'mode_button_border_hover_color' => [
166 'label' => esc_html__( 'Border Color', 'shopbuilder' ),
167 'type' => 'color',
168 'default' => '',
169 'selectors' => [
170 $widget->selectors['mode_button_border_hover_color'] => 'border-color: {{VALUE}};',
171 ],
172 ],
173 'mode_button_hover_end' => [
174 'mode' => 'tab_end',
175 ],
176 'mode_button_tabs_end' => [
177 'mode' => 'tabs_end',
178 ],
179 'mode_button_radius' => [
180 'label' => esc_html__( 'Border Radius', 'shopbuilder' ),
181 'type' => 'dimensions',
182 'mode' => 'responsive',
183 'size_units' => [ 'px', '%', 'em' ],
184 'selectors' => [
185 $widget->selectors['mode_button_radius'] => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
186 ],
187 ],
188 'mode_button_grid_icon' => [
189 'label' => esc_html__( 'Grid View Icon', 'shopbuilder' ),
190 'type' => 'icons',
191 'fa4compatibility' => 'icon',
192 'default' => [
193 'value' => 'rtsb-icon rtsb-icon-grid',
194 'library' => 'rtsb-fonts',
195 ],
196 ],
197 'mode_button_list_icon' => [
198 'label' => esc_html__( 'List View Icon', 'shopbuilder' ),
199 'type' => 'icons',
200 'fa4compatibility' => 'icon',
201 'default' => [
202 'value' => 'rtsb-icon rtsb-icon-list',
203 'library' => 'rtsb-fonts',
204 ],
205 ],
206 'mode_button_button_style_end' => [
207 'mode' => 'section_end',
208 ],
209 ];
210 return $fields;
211 }
212 }
213