PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.8.1
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.8.1
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / scroll-to-top-button / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 1.8.1, at inc/modules/scroll-to-top-button/admin/options.php

269 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Merchant - Scroll to Top Button
4 */
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 /**
11 * Settings for Desktop
12 */
13 Merchant_Admin_Options::create( array(
14 'module' => 'scroll-to-top-button',
15 'title' => __( 'Settings for Desktop', 'merchant' ),
16 'fields' => array(
17
18 array(
19 'id' => 'style',
20 'type' => 'select',
21 'title' => esc_html__( 'Button style', 'merchant' ),
22 'options' => array(
23 'merchant-style-filled' => 'Filled',
24 'merchant-style-outline' => 'Outline',
25 ),
26 'default' => 'merchant-style-filled',
27 ),
28
29 array(
30 'id' => 'type',
31 'type' => 'select',
32 'title' => esc_html__( 'Type', 'merchant' ),
33 'options' => array(
34 'icon' => esc_html__( 'Icon', 'merchant' ),
35 'text-icon' => esc_html__( 'Text + icon', 'merchant' ),
36 ),
37 'default' => 'icon',
38 ),
39
40 array(
41 'id' => 'icon',
42 'type' => 'choices',
43 'title' => esc_html__( 'Icon', 'merchant' ),
44 'options' => array(
45 'arrow-1' => '%s/arrow-1.svg',
46 'arrow-2' => '%s/arrow-2.svg',
47 'arrow-3' => '%s/arrow-3.svg',
48 'arrow-4' => '%s/arrow-4.svg',
49 ),
50 'default' => 'arrow-1',
51 ),
52
53 array(
54 'id' => 'text',
55 'type' => 'text',
56 'title' => 'Text',
57 'default' => esc_html__( 'Back to top', 'merchant' ),
58 'condition' => array( 'type', '==', 'text-icon' ),
59 ),
60
61 array(
62 'id' => 'position',
63 'type' => 'select',
64 'title' => esc_html__( 'Position', 'merchant' ),
65 'options' => array(
66 'merchant-position-left' => 'Left',
67 'merchant-position-right' => 'Right',
68 ),
69 'default' => 'merchant-position-right',
70 ),
71
72 array(
73 'id' => 'side-offset',
74 'type' => 'range',
75 'title' => esc_html__( 'Side offset', 'merchant' ),
76 'min' => 1,
77 'max' => 500,
78 'step' => 1,
79 'unit' => 'px',
80 'default' => 30,
81 ),
82
83 array(
84 'id' => 'bottom-offset',
85 'type' => 'range',
86 'title' => esc_html__( 'Bottom offset', 'merchant' ),
87 'min' => 1,
88 'max' => 500,
89 'step' => 1,
90 'unit' => 'px',
91 'default' => 30,
92 ),
93
94 array(
95 'id' => 'visibility',
96 'type' => 'select',
97 'title' => esc_html__( 'Visibility', 'merchant' ),
98 'options' => array(
99 'all' => esc_html__( 'Show on all devices', 'merchant' ),
100 'desktop-only' => esc_html__( 'Desktop only', 'merchant' ),
101 'mobile-only' => esc_html__( 'Mobile only', 'merchant' ),
102 ),
103 'default' => 'all',
104 ),
105
106 ),
107 ) );
108
109 /**
110 * Settings for Mobile
111 */
112 Merchant_Admin_Options::create( array(
113 'module' => 'scroll-to-top-button',
114 'title' => 'Settings for Mobile',
115 'fields' => array(
116
117 array(
118 'id' => 'side-offset-mobile',
119 'type' => 'range',
120 'title' => esc_html__( 'Side offset', 'merchant' ),
121 'min' => 1,
122 'max' => 50,
123 'step' => 1,
124 'unit' => 'px',
125 'default' => 30,
126 ),
127
128 array(
129 'id' => 'bottom-offset-mobile',
130 'type' => 'range',
131 'title' => esc_html__( 'Bottom offset', 'merchant' ),
132 'min' => 1,
133 'max' => 50,
134 'step' => 1,
135 'unit' => 'px',
136 'default' => 30,
137 ),
138
139 ),
140 ) );
141
142 /**
143 * Style Settings
144 */
145 Merchant_Admin_Options::create( array(
146 'module' => 'scroll-to-top-button',
147 'title' => esc_html__( 'Style', 'merchant' ),
148 'fields' => array(
149
150 array(
151 'id' => 'icon-size',
152 'type' => 'range',
153 'title' => esc_html__( 'Icon size', 'merchant' ),
154 'min' => 1,
155 'max' => 500,
156 'step' => 1,
157 'unit' => 'px',
158 'default' => 18,
159 ),
160
161 array(
162 'id' => 'text-size',
163 'type' => 'range',
164 'title' => esc_html__( 'Text size', 'merchant' ),
165 'min' => 1,
166 'max' => 500,
167 'step' => 1,
168 'unit' => 'px',
169 'default' => 18,
170 'condition' => array( 'type', '==', 'text-icon' ),
171 ),
172
173 array(
174 'id' => 'padding',
175 'type' => 'range',
176 'title' => esc_html__( 'Padding', 'merchant' ),
177 'min' => 1,
178 'max' => 500,
179 'step' => 1,
180 'unit' => 'px',
181 'default' => 15,
182 ),
183
184 array(
185 'id' => 'border-size',
186 'type' => 'range',
187 'title' => esc_html__( 'Border size', 'merchant' ),
188 'min' => 1,
189 'max' => 500,
190 'step' => 1,
191 'unit' => 'px',
192 'default' => 2,
193 'condition' => array( 'style', '==', 'outline' ),
194 ),
195
196 array(
197 'id' => 'border-radius',
198 'type' => 'range',
199 'title' => esc_html__( 'Border radius', 'merchant' ),
200 'min' => 1,
201 'max' => 500,
202 'step' => 1,
203 'unit' => 'px',
204 'default' => 30,
205 ),
206
207 array(
208 'id' => 'icon-color',
209 'type' => 'color',
210 'title' => esc_html__( 'Icon color', 'merchant' ),
211 'default' => '#FFFFFF',
212 ),
213
214 array(
215 'id' => 'icon-hover-color',
216 'type' => 'color',
217 'title' => esc_html__( 'Icon color hover', 'merchant' ),
218 'default' => '#FFFFFF',
219 ),
220
221 array(
222 'id' => 'text-color',
223 'type' => 'color',
224 'title' => esc_html__( 'Text color', 'merchant' ),
225 'default' => '#FFFFFF',
226 'condition' => array( 'type', '==', 'text-icon' ),
227 ),
228
229 array(
230 'id' => 'text-hover-color',
231 'type' => 'color',
232 'title' => esc_html__( 'Text color hover', 'merchant' ),
233 'default' => '#FFFFFF',
234 'condition' => array( 'type', '==', 'text-icon' ),
235 ),
236
237 array(
238 'id' => 'border-color',
239 'type' => 'color',
240 'title' => esc_html__( 'Border color', 'merchant' ),
241 'default' => '#212121',
242 'condition' => array( 'style', '==', 'outline' ),
243 ),
244
245 array(
246 'id' => 'border-hover-color',
247 'type' => 'color',
248 'title' => esc_html__( 'Border color hover', 'merchant' ),
249 'default' => '#757575',
250 'condition' => array( 'style', '==', 'outline' ),
251 ),
252
253 array(
254 'id' => 'background-color',
255 'type' => 'color',
256 'title' => esc_html__( 'Background color', 'merchant' ),
257 'default' => '#212121',
258 ),
259
260 array(
261 'id' => 'background-hover-color',
262 'type' => 'color',
263 'title' => esc_html__( 'Background color hover', 'merchant' ),
264 'default' => '#757575',
265 ),
266
267 ),
268 ) );
269